feature: update message for login feature
This commit is contained in:
+6
-1
@@ -25,5 +25,10 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
]);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions): void {
|
||||
//
|
||||
$exceptions->render(function (\Illuminate\Auth\AuthenticationException $e, \Illuminate\Http\Request $request) {
|
||||
if ($request->expectsJson()) {
|
||||
return response()->json(['message' => $e->getMessage()], 401);
|
||||
}
|
||||
return redirect()->guest(route('login'))->with('session_expired', true);
|
||||
});
|
||||
})->create();
|
||||
|
||||
Reference in New Issue
Block a user