File manager - Edit - /var/www/html/gop/api/app/Http/Requests/Update/UpdateImageRequest.php
Back
<?php namespace App\Http\Requests\Update; use App\Enums\ImageModels; use App\Models\User; use Illuminate\Foundation\Http\FormRequest; class UpdateImageRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array<string, mixed> */ public function rules() { $imageableTable = ImageModels::getModelTable($this->input('imageable_type')); return [ 'imageable_id' => 'required|exists:'.$imageableTable.',id', 'imageable_type' => 'required|in:'.implode(',', ImageModels::values()), ]; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings