I have a Laravel project with this code:
$names = isset($user->party->personName->first_name) ? $user->party->personName->first_name . ' ' . $user->party->personName->last_name : null;
$role = $user->userRole->role->name ?? null
On the dev server this is working. On Homestead $names
and $role
are always null
. As I know isset()
should trigger __isset()
method in the Model
class but id does not.
Laravel version - 5.2.31
PHP on dev server - 7.0.2
PHP on Homestead - 7.0.8-2+deb.sury.org~xenial+1
Is this because the difference of the PHP versions or there is some setting?