0

I am curious to know whether Laravel Auth routing can be use outside of the default login/register page. If there is 2 different login pages in a project, is it possible to handle both request by Auth::route().

2nd login page be like:

 <form class="form" role="form" method="post" action="{{ route('login') }}" accept-charset="UTF-8" id="login-nav">
                  <div class="form-group">
                    <label class="sr-only" for="LogInEmail">Email address</label>
                    <input type="email" class="form-control" id="LogInEmail" placeholder="Email address" required>
                  </div>
                  <div class="form-group">
                    <label class="sr-only" for="LogInPassword">Password</label>
                    <input type="password" class="form-control" id="LogInPassword" placeholder="Password" required>
                    <div class="help-block text-right">
                    <a href="">Forget the password ?</a>
                  </div>
                </div>
                <div class="form-group">
                  <button type="submit" class="btn btn-primary btn-block blue-gradient z-depth-1a">Log in <i class="fas fa-sign-in-alt ml-1"></i></button>
                </div>
                <div class="checkbox">
                  <label>
                    <input type="checkbox"> keep me logged-in
                  </label>
                </div>
              </form>

I am showing only 1 login because php artisan make:auth gives you the default one. What changes need to make if I want to pass this form data to Auth::route() ?

Thanks

1 Answers1

1

Auth::route() is syntactic sugar for routes Laravel bootstrap. This answer shows the workings. You could just copy the files that Auth::routes() creates and edit them as suites you.

IdiakosE Sunday
  • 112
  • 1
  • 8