LDAP for Laravel · v4
LdapRecord Laravel
Let users sign in with their LDAP credentials. Keep your database users in sync and query your directory using the Laravel conventions you already know.
Built on LdapRecord Core, with directory models and queries included.
use Illuminate\Support\Facades\Auth;
$credentials = [
'mail' => '[email protected]',
'password' => $password,
];
if (Auth::attempt($credentials)) {
request()->session()->regenerate();
return redirect()->intended('/dashboard');
}
After configuring your LDAP authentication provider, use Laravel’s Auth facade to sign in.
Bring your directory into Laravel
Set up your application
Need a hand getting started?