🔹 Answer :
$user=auth()->user() ?? User::find(1);


🔶 Wrong Answer:
$user = auth()->user() ?: User::find(1);

Comments

Be the first to add a comment