Is there a better way to custom Shield login form? |
Hello everyone,
I am implementing Shield, and I would like to customize the login form. Following the documentation I started to add and update the router in Routes.php file: PHP Code: $routes->get('login', '\App\Controllers\Auth\LoginController::loginView'); PHP Code: service('auth')->routes($routes, ['except' => ['login']]); Then I added the custom controller in App/Controllers/Auth/LoginController.php with the following namespace: PHP Code: namespace App\Controllers\Auth; Here is the body of my custom LoginController controller: PHP Code: <?php Everything works fine. I have the default form as expected for my tests. So my question is the following: Is there another way to only custom the form appearance without override the loginAction post method? Thank you!
Si vous pouvez le rêver, vous pouvez le faire.
(09-14-2022, 10:58 AM)lokman Wrote: only custom the form appearance without override the loginAction post method? If you mean to change the login form view. What you have done is not needed. See the link below : https://github.com/codeigniter4/shield/discussions/480 |
Welcome Guest, Not a member yet? Register Sign In |