php - Laravel Auth::user()->name and Auth::user()->id is not working - Stack Overflow

PHOTO EMBED

Wed Mar 15 2023 09:05:29 GMT+0000 (Coordinated Universal Time)

Saved by @oday #php

auth()->user()->name;
auth()->id();

be sure that you are logged in. and use that


content_copyCOPY

https://stackoverflow.com/questions/62248112/laravel-authuser-name-and-authuser-id-is-not-working