we have created a restful api using laravel which is working fine for andriod now my boss want me to create web application using the same api now i want to create another auth for web application but username and password will match to api. Api will create a token and i want to use that token in the application.
my authention code
protected function authenticated(Request $request)
{
if(strtolower(auth()->user()->status) == strtolower('active')) {
$this->get_menu($request);
return redirect('/home');
}
else{
auth()->logout();
return redirect('login');
}
}
if any one have any better solution then please guide me.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2DOT45D
via IFTTT
Aucun commentaire:
Enregistrer un commentaire