app/Http/Requests/StoreProductRequest.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|min:5|max:20',
            'description' => 'required|min:5|max:200',
            'slug'=>'required|unique:products|min:5|max:50'
        ];
    }
public function rules ( ) { return [ 'name' => 'required|min:5|max:20' , 'description' => 'required|min:5|max:200' , 'slug' => 'required|unique:products|min:5|max:50' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .
// 'name' => 'required|unique:categories|min:5|max:20',