From f01511ba7360b11b60558512c4ec34fcbc612db9 Mon Sep 17 00:00:00 2001 From: al3nzy6 <34768802+al3nzy6@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:44:47 +0000 Subject: [PATCH 1/2] Update change default username --- config/adminlte.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/adminlte.php b/config/adminlte.php index 727a0018..b6624b67 100644 --- a/config/adminlte.php +++ b/config/adminlte.php @@ -139,7 +139,7 @@ 'usermenu_image' => false, 'usermenu_desc' => false, 'usermenu_profile_url' => false, - + /* |-------------------------------------------------------------------------- | Layout @@ -265,7 +265,7 @@ 'password_email_url' => 'password/email', 'profile_url' => false, 'disable_darkmode_routes' => false, - + 'username_field' => 'email', // This to use it inside LoginController username() return Config('adminlte.usernamefield') /* |-------------------------------------------------------------------------- | Laravel Asset Bundling From 69a62ee0a335867866d8f0a2ddfae14e771c11fb Mon Sep 17 00:00:00 2001 From: al3nzy6 <34768802+al3nzy6@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:48:02 +0000 Subject: [PATCH 2/2] Update login.blade.php --- resources/views/auth/login.blade.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index c5e16940..794fbfb0 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -6,6 +6,7 @@ @php( $login_url = View::getSection('login_url') ?? config('adminlte.login_url', 'login') ) @php( $register_url = View::getSection('register_url') ?? config('adminlte.register_url', 'register') ) +@php( $username = config('adminlte.username_field', 'email') ) @php( $password_reset_url = View::getSection('password_reset_url') ?? config('adminlte.password_reset_url', 'password/reset') ) @if (config('adminlte.use_route_url', false)) @@ -26,8 +27,8 @@ {{-- Email field --}}
- +
@@ -35,7 +36,7 @@
- @error('email') + @error($username) {{ $message }}