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
id is protected, just add a public method in your /models/User.php
protected
/models/User.php
public function getId() { return $this->id; }
so you can call it
$id = Auth::user()->getId();
remember allways to test if user is logged...
if (Auth::check()) { $id = Auth::user()->getId(); }