app/Http/Requests/OrderRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'total' => 'required',
            'user_id' => 'required|exists:users,id',
            'first_name' => 'required',
            'last_name' => 'required',
            'email' => 'required|email',
            'country' => 'required',
            'city' => 'required',
            'province' => 'required',
            'address' => 'required',
            'zipcode' => 'required|regex:/^[0-9]{3,7}$/',
            'phone' => 'required|numeric|',
            'notes' => 'nullable',
        ];
    }
public function rules ( ) { return [ 'total' => 'required' , 'user_id' => 'required|exists:users,id' , 'first_name' => 'required' , 'last_name' => 'required' , 'email' => 'required|email' , 'country' => 'required' , 'city' => 'required' , 'province' => 'required' , 'address' => 'required' , 'zipcode' => 'required|regex:/^[0-9]{3,7}$/' , 'phone' => 'required|numeric|' , 'notes' => 'nullable' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .