/** * @return integer|null */ private function getDefaultStorageServiceId() { /** @type BaseModel $model */ $model = Service::whereType('local_file')->first(); $storageServiceId = $model ? $model->{Service::getPrimaryKeyStatic()} : null; return $storageServiceId; }