how to solve this issue? Access to an undefined property Illuminate\Contracts\Auth\Authenticatable::$id
#1738
-
this is my code $user = auth()->guard('sanctum')->user();
if ($user) {
$memberId = $user->id;
$membership = Str::title($user->membership->name);
$uniqueIdentifier = $user->unique_identifier;
} |
Beta Was this translation helpful? Give feedback.
Answered by
szepeviktor
Sep 18, 2023
Replies: 1 comment
-
Try if ($user instanceof User) { |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
canvural
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try