Reputation: 35
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?
Upvotes: 0
Views: 1013
Reputation: 2730
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.
Cartalyst\Sentinel\Laravel\SentinelServiceProvider::class,
In the $aliases
array add the following facades for this package.
'Activation' => Cartalyst\Sentinel\Laravel\Facades\Activation::class,
'Reminder' => Cartalyst\Sentinel\Laravel\Facades\Reminder::class,
'Sentinel' => Cartalyst\Sentinel\Laravel\Facades\Sentinel::class,
Source: https://cartalyst.com/manual/sentinel/5.x#laravel-8
Upvotes: 0