Edit File: UpdateBranchRequest.php
<?php namespace App\Http\Requests\Api\branches; use App\Traits\ApiTrait; use Illuminate\Contracts\Validation\Validator; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Http\Exceptions\HttpResponseException; class UpdateBranchRequest extends FormRequest { use ApiTrait; /** * 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 */ public function rules() { return [ 'lat'=>'required', 'long'=>'required', 'address'=>'required', // 'phone'=> ['required','numeric'], // 'name_ar' => 'required|string|min:3|max:191', // 'name_en' => 'required|string|min:3|max:191', // 'email'=> 'required|email', // 'password' => 'nullable|min:6', // 'country_key'=> 'required', // 'branch_id'=>'required', // 'days' => 'nullable', // 'to' => 'nullable', // 'from' => 'nullable', // 'store_days' => 'nullable', // 'bank_name' => '', // 'bank_number' => '', ]; } protected function failedValidation(Validator $validator) { throw new HttpResponseException($this->requestFailsReturn($validator)); } }
Back to File Manager