This commit makes sure that the test URL is renamed to the general login URL for local development and only works in local development.
This commit is contained in:
@@ -35,11 +35,13 @@
|
||||
});
|
||||
});
|
||||
|
||||
// Dev auto-login route
|
||||
Route::get('/login-for-testing', function () {
|
||||
$user = \App\Models\User::where('username', 'jonathan.van.rij@agerion.nl')->first();
|
||||
// Dev auto-login route (local and testing environments only)
|
||||
if (app()->environment(['local', 'testing'])) {
|
||||
Route::get('/login-jonathan', function () {
|
||||
$user = \App\Models\User::where('username', 'jonathan.van.rij@agerion.nl')->first();
|
||||
|
||||
auth()->login($user);
|
||||
auth()->login($user);
|
||||
|
||||
return redirect('/');
|
||||
});
|
||||
return redirect('/');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user