Non-static method Stevebauman\Purify\Purify::clean() should not be called statically
Inside the class store:
$req = Purify::clean($request-\>except('\_token', '\_method'));
public function store(Request $request)
{
$req = Purify::clean($request->except('_token', '_method'));
$rules = ['category_title' => 'required',
'category_description' => 'nullable',
'image' => ['nullable', 'image', new FileTypeValidate(['jpeg', 'jpg', 'png'])]
];
$validator = Validator::make($request->all(), $rules);
if ($validator->fails()) {
return back()->withErrors($validator)->withInput();
}
}