I'm trying to find out how to return the relations I set up for my User model when using Sentry 2.
Normally, I have a user retrieved like this:
$user = User::find(1);
// get some relation
return $user->profile->profile_name;
However, now when I have Sentry 2 implemented I can retrieve the logged in user like this:
$user = Sentry::getUser();
This way I can easily access the users
table in my DB, but how do I go about fetching the relations and methods I have set up in my User.php
model?
This seems way to clumpsy, and not Laravel-ish:
User::find(Sentry::getUser()->id)->profile->wizard_completed;
It seems somewhat... backwards.
Can you guys help me out? =)