Reputation: 1
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();
}
}
Upvotes: 0
Views: 659
Reputation: 15319
import facade class like below
use Stevebauman\Purify\Facades\Purify
not
use Stevebauman\Purify\Purify
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.
Upvotes: 1