diff --git a/app/Controllers/Auth/LoginController.php b/app/Controllers/Auth/LoginController.php index ff93f1eb..6913ea2b 100644 --- a/app/Controllers/Auth/LoginController.php +++ b/app/Controllers/Auth/LoginController.php @@ -5,6 +5,7 @@ use Illuminate\Routing\Controller; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; +use Illuminate\Support\Str; class LoginController extends Controller { @@ -66,7 +67,11 @@ public function showLoginForm() ]); } - + protected function authenticated(Request $request, $user) + { + $user->api_token = Str::random(60); + $user->save(); + } public function logout(Request $request) {