Support the ongoing development of Laravel.io →
Authentication
Last updated 1 year ago.
0

I've solved it! This line

Auth::guard('admin')->attempt(array('OUsername' => $username, 'OPassword' => $password))

Should be

Auth::guard('admin')->attempt(array('OUsername' => $username, 'password' => $password))

It will work even if I have a different column name for password since in my model I have specified this

public function getAuthPassword()
    {
        return $this->OPassword;
    }
0

Sign in to participate in this thread!

Eventy

Your banner here too?

RienRien rienrien Joined 19 Feb 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.