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