*/ protected $fillable = [ 'uid', 'name', 'service_name', 'service_url', 'service_photo', 'user_name', 'user_url', 'user_photo', ]; /** @var array */ protected $visible = [ 'uid', 'name', 'service', 'user', ]; /** @var array */ protected $appends = [ 'service', 'user', ]; protected function service(): Attribute { return Attribute::get( get: fn ($value, $attributes) => [ 'name' => $attributes['service_name'], 'url' => $attributes['service_url'], 'photo' => $attributes['service_photo'], ], ); } protected function user(): Attribute { return Attribute::get( get: fn ($value, $attributes) => [ 'name' => $attributes['user_name'], 'url' => $attributes['user_url'], 'photo' => $attributes['user_photo'], ], ); } }