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();
}
}
import facade class like below
not
Also
Are you caching your configuration files? Try running
php artisan config:clear
and try again.It looks like your application isn't loading the service provider, or isn't auto-loading the purify classes.
Ref:Class purify does not exist | Non-static method Stevebauman\Purify\Purify::clean() should not be called statically #9