Laravel: Guards vs Providers
27 January 2023 (Updated 27 January 2023)
Guards define how users are authenticated for each request. An example guard is the session
guard that maintains the authentication state using session storage and cookies.
Providers define how users are retrieved from your persistent storage (e.g., MySQL database). Laravel provides a way to retrieve users via Eloquent. But you can define custom providers as needed.
Tagged:
Laravel
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment