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|string|max:' . Product::NAME_MAX_LENGTH,
            'description' => 'string|max:' . Product::DESCRIPTION_MAX_LENGTH,
            'cost' => 'required|numeric|min:0',
            'photos' => 'required|array|max:3',
        ];
    }
public function rules ( ) { return [ 'name' => 'required|string|max:' . Product :: NAME_MAX_LENGTH , 'description' => 'string|max:' . Product :: DESCRIPTION_MAX_LENGTH , 'cost' => 'required|numeric|min:0' , 'photos' => 'required|array|max:3' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .