Closed rajanrawal closed 9 years ago
Have you verified that it returns GenericUser
?
Yes. I did dd(Auth::user()->get()); On Nov 28, 2014 5:35 PM, "Ollie Read" notifications@github.com wrote:
Have you verified that it returns GenericUser?
— Reply to this email directly or view it on GitHub https://github.com/ollieread/multiauth/issues/67#issuecomment-64887288.
So, how to solve this? I'm trying to:
$document->creator()->associate(Auth::user()->get());
Output:
Argument 1 passed to Illuminate\Database\Eloquent\Relations\BelongsTo::associate() must be an instance of Illuminate\Database\Eloquent\Model, instance of Illuminate\Auth\GenericUser given, called in (...)
With Auth::user()->get() I am able to get the properties of the User Class but I am not able to access the relationships, obvious thing is that it returns me a Illuminate\Auth\GenericUser class. What is I want to get a User Class ( The main model ) Object? As because I want to access the other functions of User model, mostly relationships