File manager - Edit - /var/www/html/spdc/api/app/Http/Requests/GeologicHazardLayerRequest.php
Back
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Http\Exceptions\HttpResponseException; use Illuminate\Contracts\Validation\Validator; class GeologicHazardLayerRequest 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() { return [ 'name' => 'required|string|min:3|max:255', 'file' => 'required|string|min:3' ]; } public function failedValidation(Validator $validator) { throw new HttpResponseException(response()->json([ 'success' => false, 'message' => 'Validation errors', 'data' => $validator->errors() ])); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings