I\'m getting the following error \"trying to get a property of a non-object\" when I submit a form to add a user, the error is apparently on the first line: Auth::user()->id
For Laravel 6.X you can do the following:
$user = Auth::guard()->user(); $user_id = $user->id; $full_name = $user->full_name;