Laravel Fortify/Jetstream: extend $user attribute with model relations

  laravel, laravel-8

To Fortify’s UpdateUserProfileInformation I want to add some attributes to the $user variable from a related model.

$user = [
 email => ..
 name => ..
 profile.is_active => ..
];

The $with property on the User model didn’t add it to the $user variable in Jetstream.
And in Jetstreams’ useUserModel I can’t extend the existing model.

Does anyone know how to extend the $user variable in Jetstream/Fortify?

Source: Laravel

Leave a Reply