Skip to content

Commit 800aa0f

Browse files
committed
clean LoginControler
1 parent e71dd36 commit 800aa0f

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

app/Http/Controllers/Auth/LoginController.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,15 @@ class LoginController extends Controller
1818
use AuthenticatesUsers;
1919

2020
protected string $redirectTo = '/home';
21-
protected string $username;
2221

2322
public function __construct()
2423
{
2524
$this->middleware('guest')->except('logout');
26-
$this->username = $this->findUsername();
27-
}
28-
29-
/**
30-
* N'utiliser QUE le champ 'login' comme identifiant.
31-
*/
32-
public function findUsername(): string
33-
{
34-
$login = trim((string) request()->input('login', ''));
35-
// On merge pour que credentials($request) prenne bien 'login'
36-
request()->merge(['login' => $login]);
37-
38-
return 'login';
3925
}
4026

4127
public function username(): string
4228
{
43-
return $this->username;
29+
return 'login';
4430
}
4531

4632
/**

0 commit comments

Comments
 (0)