Talky

This still does not show us anything about authentication. What's in your admin.auth.login file?

Andreea@Webclix
    </div>
      <p class="login-box-msg" style="font-weight: 800; color:black;">Administrator login.<br />Gewone gebruiker? Klik <a href="/{{LaravelLocalization::getCurrentLocale()}}/{{ trans('routes.login') }}" title="gebruiker login">hier</a>!</p>
      <form role="form" method="POST" action="{{ url('/webclix-admin/login') }}">
            {{ csrf_field() }}
        <div class="form-group has-feedback{{ $errors->has('email') ? ' has-error' : '' }}">
          <input type="email" name="email" class="form-control" placeholder="Email" />
          @if ($errors->has('email'))
                      <span class="help-block">
                          <strong>{{ $errors->first('email') }}</strong>
                      </span>
                  @endif
          <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
        </div>
        <div class="form-group has-feedback{{ $errors->has('password') ? ' has-error' : '' }}">
          <input type="password" name="password" class="form-control" placeholder="Wachtwoord" />
          @if ($errors->has('password'))
                      <span class="help-block">
                          <strong>{{ $errors->first('password') }}</strong>
                      </span>
                  @endif
          <span class="glyphicon glyphicon-lock form-control-feedback"></span>
        </div>
        <div class="row">

          <div class="col-xs-12">
            <button type="submit" class="btn btn-primary btn-block btn-flat">Inloggen </button>
          </div>
          <div class="col-xs-12" style="padding-top:15px;">
            {{-- <small><a href="{{ url('password/reset') }}" class="form-link">Wachtwoord vergeten?</a></small> --}}
            <small>Wachtwoord vergeten? Neem contact op met uw beherder - <a href="mailto:[email protected]?subject=Webclix Admin - Ik ben mijn wachtwoord vergeten.">[email protected]</a></small>
          </div>
        </div>
      </form>
    </div>
  </div>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
Talky

Everything seems to be perfectly fine for now. What about '/webclix-admin/login' POST route? find us that method and show it, please

Andreea@Webclix

Route::post('webclix-admin/login', [email protected]')->name('login');

Talky

but show us the method responsible for this route, you did not attach it on the previous page :(

PS: Yay, just spammed my way through the first thousand points!

Andreea@Webclix

I didn't make that controller myself actually, the AdminAuthController doesn't seem to have a login methode.

Just a guess but I think the 'use AuthenticatesAndRegistersUsers' and 'use ThrottlesLogins' take care of the loggin in itself.

Talky

look for this method then. It's also worth checking middleware. I'm leaving work now but I'll be tomorrow and will check on this thread. Hope you'll solve it till then!

Andreea@Webclix

The AuthenticatesAndRegistersUsers points to AuthenticesUsers. This has a login method.

public function login(Request $request) { $this->validateLogin($request);

    // If the class is using the ThrottlesLogins trait, we can automatically throttle
    // the login attempts for this application. We'll key this by the username and
    // the IP address of the client making these requests into this application.
    $throttles = $this->isUsingThrottlesLoginsTrait();

    if ($throttles && $lockedOut = $this->hasTooManyLoginAttempts($request)) {
        $this->fireLockoutEvent($request);

        return $this->sendLockoutResponse($request);
    }

    $credentials = $this->getCredentials($request);

    if (Auth::guard($this->getGuard())->attempt($credentials, $request->has('remember'))) {
        return $this->handleUserWasAuthenticated($request, $throttles);
    }

    // If the login attempt was unsuccessful we will increment the number of attempts
    // to login and redirect the user back to the login form. Of course, when this
    // user surpasses their maximum number of attempts they will get locked out.
    if ($throttles && ! $lockedOut) {
        $this->incrementLoginAttempts($request);
    }

    return $this->sendFailedLoginResponse($request);
}
joyal
joyal
1 month ago (2,210 XP)

changing you session_driver from file to database may fix this issue.

Step 1: Edit you .env file, change SESSION_DRIVER=file to SESSION_DRIVER=database.

Step 2: create a session migration run "php artisan session:table"

Step 3: run "composer dump-autoload"

Step 4: run "php artisan migrate"

Sign In or create a forum account to participate in this discussion.