app/Http/Requests/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 [
            'product_name' => 'required|min:1|max:250|unique:products,name',
            'img' => 'required',
            'product_description' => 'required|min:5|max:250',
            'price'=> 'required|min:1|max:250',
        ];
    }
public function rules ( ) { return [ 'product_name' => 'required|min:1|max:250|unique:products,name' , 'img' => 'required' , 'product_description' => 'required|min:5|max:250' , 'price' => 'required|min:1|max:250' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .