Level 61
Guards define how users are authenticated for each request. For example, Laravel ships with a session guard which maintains state using session storage and cookies.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I usually check login in with Auth :: attemp () and never pay attention to 'guard', so what is 'guard' here and how to use it?
Please or to participate in this conversation.