id() && ($property = Property::query()->find($propertyId))) { app(CurrentProperty::class)->select($property); } return $record; } public static function recordPropertyId(Model $record): ?int { $id = $record->getAttribute('property_id'); return $id !== null ? (int) $id : null; } }