I am trying to figure out how to return the relationships that I configured for my User model when using Sentry 2.
Typically, I have a user obtained as follows:
$user = User::find(1);
return $user->profile->profile_name;
However, now that I have Sentry 2, I can get a registered user as follows:
$user = Sentry::getUser();
This way, I can easily access the table usersin my database, but how do I deal with the choice of relationships and methods that I set in my model User.php?
This is similar to clumpsy, not Laravel-ish:
User::find(Sentry::getUser()->id)->profile->wizard_completed;
It seems a little ... back.
Can you guys help me? =)
Marty