Edit File: Store.php
<?php namespace App\Http\Requests\Admin\Address; use Illuminate\Foundation\Http\FormRequest; class Store 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 */ public function rules() { if ( $this->getMethod() === 'PUT' ) { return [ 'title' => 'required|string|min:3|max:190', 'long' => 'required', 'lat' => 'required', 'address' => 'required|string|min:3|max:190', ]; } else { return [ 'title' => 'required|string|min:3|max:190', 'long' => 'required', 'lat' => 'required', 'address' => 'required|string|min:3|max:190', ]; } } }
Back to File Manager