app/Http/Requests/Admin/ProductRequest.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 [
            'name' =>'required|max:25',
            'user_id' =>'required|exists:users,id',
            'categories_id'=>'required|exists:categories,id',
            'price'=>'required|integer',
            'description'=>'required'
        ];
    }
public function rules ( ) { return [ 'name' => 'required|max:25' , 'user_id' => 'required|exists:users,id' , 'categories_id' => 'required|exists:categories,id' , 'price' => 'required|integer' , 'description' => 'required' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .