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
Never forget to include and try to use middleware auth:
use Illuminate\Http\Request;
Then find the id using request method:
$id= $request->user()->id;