W
W
wideShift2021-04-17 20:33:59
Laravel
wideShift, 2021-04-17 20:33:59

How does authentication work in laravel(principle)?

When the user is authenticated:
Auth::login(...)
I check this in the blade template:

@if (auth()->check())
 Вход выполнен
@endif

I'm wondering how the check method works?
As far as I understand, after authentication (for example, by the login method)
, the user identifier (id from the users table) is stored in the session
and every time the page is requested, the check method takes this identifier and searches it in the users table?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
imdeveloper, 2021-04-17
@link_web

This is how it
checks the session

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question