Welcome Guest, Not a member yet? Register   Sign In
Customize the redirect if not logged in
#2

(This post was last modified: 04-03-2023, 10:30 AM by [email protected].)

Hi,
change the redirects in auth.php config:


PHP Code:
auth.php:
    /**
    * --------------------------------------------------------------------
    * Redirect URLs
    * --------------------------------------------------------------------
    * The default URL that a user will be redirected to after various auth
    * auth actions. This can be either of the following:
    *
    * 1. An absolute URL. E.g. http://example.com OR https://example.com
    * 2. A named route that can be accessed using `route_to()` or `url_to()`
    * 3. A URI path within the application. e.g 'admin', 'login', 'expath'
    *
    * If you need more flexibility you can override the `getUrl()` method
    * to apply any logic you may need.
    */
    public array $redirects = [
        'register'    => '/',
        'login'      => '/',
        'logout'      => 'login',
        'force_reset' => '/',
    ]; 
Reply


Messages In This Thread
RE: Customize the redirect if not logged in - by [email protected] - 04-03-2023, 10:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB