mardi 4 février 2020

Store remember token upon user creation

Currently the laravel remember token work if you approver it on email.

How can I store it at the same time of creating the user?

Here's my code

$user = New User;
$user->username = $request->username;
$user->password = bcrypt($request->password);
$user->role = $request->role;
$user->remember_token = '' //I don't know how
$user->save();

Thank you for your help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire