Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ldaprecord Laravel

Ldaprecord Laravel Laravel Package

directorytree/ldaprecord-laravel

LdapRecord-Laravel integrates LDAP, OpenLDAP, and Active Directory with Laravel using Eloquent-style models, native authentication, user synchronization, multi-domain connections, and a testing toolkit, making it simpler to build applications that securely read and manage directory data.

View on GitHub
Deep Wiki
Context7

LDAP Record Laravel integrates LDAP Record with Laravel, providing Eloquent-style models for directory servers. It simplifies LDAP authentication, user lookup, and directory synchronization within Laravel applications.

  • Eloquent-like LDAP models and query builder
  • Built-in authentication and user provider
  • Import/synchronize LDAP users into databases
  • Support for multiple LDAP connections
  • Testing utilities and configuration publishing
Frequently asked questions about Ldaprecord Laravel
How do I install and configure LdapRecord-Laravel?
Install the package with Composer and publish its configuration so you get config/ldap.php, where connections, base DN, and credentials are defined. Then register the LDAP auth guard and user provider in your auth configuration alongside your existing guards. The package is a Laravel integration layer over the LdapRecord core ORM, so most setup is configuration rather than custom code.
Which Laravel versions does LdapRecord-Laravel support?
Support tracks Laravel majors directly: v3.3.0 targets Laravel 11, v3.4.0 targets Laravel 12, and v3.4.3 targets Laravel 13. Because the framework-specific glue is exactly the part that changes with each Laravel release, you should check the release notes against your Laravel version before upgrading. Pin the package version in composer.json and read the changelog on every bump.
Can I use LDAP authentication alongside my existing Laravel password login?
Yes. The LDAP guard is a swappable auth guard that can coexist with your existing web or database guard, so you can enable it for one tenant or design partner without committing your whole user base. That per-tenant reversibility is the main de-risking property of the package. Rollout can be staged behind a flag and expanded incrementally.
How do I import and sync LDAP users into my Laravel database?
The package ships Artisan commands including ldap:import for provisioning users from the directory, plus Eloquent-style models so you can synchronize attributes into your database records. Import and sync work well as scheduled jobs, keeping directory data and application data aligned. Group-to-role mapping and an audit surface can be layered on after the initial sync slice ships.
Can I connect to multiple LDAP servers or both Active Directory and another directory?
Yes. Multiple connections are configured in config/ldap.php, so scenarios like one connection per tenant, or Active Directory plus a second directory, are configuration problems rather than architectural ones. That meaningfully lowers per-tenant integration cost for organizations running more than one directory. Each connection can have its own base DN and query configuration.
How do I test LDAP authentication and queries without a real directory server?
Use the built-in Directory Emulator, which decouples your CI pipeline and local development from a live customer directory. That removes the dependency on customer IT access for day-to-day development and lets LDAP work be parallelized rather than serialized behind directory provisioning. The v4.0.x patch line also includes emulator fixes for chunk and connection handling.
How do I map LDAP groups to Laravel roles and permissions?
LDAP groups and OUs are queried through the same Eloquent-style models and fluent query builder used for user entries, so group membership can be read and translated into application roles. In practice this is a separate, shippable slice after login and scheduled sync are working. Keeping it as its own slice makes the rollout easier to plan and test.
What risks should I consider before using LdapRecord-Laravel in production?
The package is MIT-licensed and community-maintained by a small maintainer group, with no SLA, indemnity, or named support contact, which is acceptable for internal and mid-market deployments but will fail procurement in regulated or large-enterprise deals. Adoption signal is mixed: 574 stars and an active patch cadence are positive, but zero dependents means your team will likely be among the more advanced users, so budget time for reading source rather than only docs. The dominant risk is scope and directory access, not code quality: bind credentials, OU scope, schema quirks, and network reachability to domain controllers are organizational dependencies a package cannot remove.
How do I upgrade to LdapRecord-Laravel v4?
v4.0.0 is a major release, so follow the published upgrade guide rather than bumping blindly. The v4.0.1 through v4.0.5 patches are narrow, credible fixes covering logging channel adherence, LDAP error-code diagnostics from login failures, password-mutator detection via PHP attribute, a float type hint, and directory emulator chunk and connection issues. The line is still settling, so pin versions and review the changelog on each update.
When should I use LdapRecord-Laravel instead of the core LdapRecord library?
Choose this package when your application is a Laravel monolith or a Laravel service, because the value is the framework glue: the auth guard, user provider, Eloquent-shaped models, Artisan commands, and testing helpers. If your product is not Laravel, or is Laravel only incidentally, the leverage disappears and you are effectively buying a thin wrapper around a generic PHP LDAP library. In that case use the underlying directorytree/ldaprecord library directly.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core