I have this method:
$user=Sentinel::findById($user->id);
$reminder=Reminder::exists($user)? : Reminder::create($user);
$this->sendEmail($user, $reminder->code);
return redirect()->back()->with(['success'=>'reset code sent']);
However it shows an error, Undefined type 'App\Http\Controllers\Security\Sentinel'
Does anyone know how to remove this error?
After installing the package, open your Laravel config file located at
config/app.php
and add the following lines.In the
$providers
array add the following service provider for this package.In the
$aliases
array add the following facades for this package.Source: https://cartalyst.com/manual/sentinel/5.x#laravel-8