Use
when logging inAuth::guard('admin')->attempt([])
Returns true, then prints it with dd
dd(Auth::guard('admin'))
Login to this page is possible. Then when jumping to other pages, print again
At this time, because the user attribute is empty, so
Auth::guard('admin')->user() == null Auth::guard('admin')->check() == false
Excuse me which step is wrong
Check whether the session_domain setting is correct
Both pages are directly dd?
Directly dd after logging in, resulting in no session being written.
Have you included cookies in your redirect page? . . You didn’t add it to Kernel.php