I am new to laravel 5.3 . I am using cartalyst sentinel for authentication
Web.php
Route::post('/register','RegistrationController@register');
Route::get('/activate/{email}/{activationCode}' , 'RegistrationController@activate');
RegistrationController.php
public function register(Request $request){
$user = Sentinel::register($request->all());
$activation = Activation::create($user);
$role = Sentinel::findRoleBySlug('student');
$role->users()->attach($user);
$this->sendEmail($user,$activation->code);
Alert::info('Mail has been sent to activate your account', 'Confirmation Email')->persistent("Close this");
return redirect::back();
}
authenticate method in registration controller -
public function activate($email,$activationCode){
$user = User::whereEmail($email)->first();
$sentinelUser = Sentinel::findById($user->id);
if(Activation::complete($sentinelUser, $activationCode)){
return redirect('/');
}
}
when i tried to submit the button then i got this error -
BadMethodCallException in Controller.php line 82: Method [sendEmail] does not exist.
Please help me , Thanks