jeudi 1 mars 2018

How To Save PassportToken on user login laravel

i make API by laravel passport i wanna save passport token in cookies when login is successful i tried to make this in home controller but it always generate different key

     $UserToken=Auth::user()->createToken('MyApp')->accessToken;
     cookie('valid', $UserToken, true,10);
     return  response(view('Ades Admin.DashBoard'))->cookie('valid', $UserToken, true,10);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire