Just learn the basics of Laravel. How to make it so that in the address bar the address is identical to the file that is responsible for this page. Worked with a standard authentication method. But after checking whether this existing user matches the password, being on the right page, the address bar still contains auth/login . Routes:

  Route :: get ('/ dashboard', ['uses' => 'HomeController @ dashboard', 'as' => 'dashboard']);
 Route :: get ('auth / login /', 'Auth \ AuthController @ getLogin');
 Route :: post ('auth / login /', 'Auth \ AuthController @ postLogin');
 Route :: get ('auth / logout', 'Auth \ AuthController @ getLogout'); 

HomeController:

  public function dashboard ()
     {
         return view ('pages.dashboard');
     } 

AuthController:

  protected function postLogin ()
     {
         $ email = Input :: get ('email');
         $ pass = Input :: get ('password');

         if ($ email && $ pass)
         {
             $ user = AuthModel :: where ('email', $ email) -> where ('password', $ pass) -> get ();
             if (count ($ user) == 1)
             {
                 return view ('pages.dashboard');
             }
          }
     } 

That is, after a successful login, the dashboard page is displayed, but the address bar contains auth/login . How to make a dashboard in the address bar?

    1 answer 1

    return redirect()->intended('dashboard');