|
|
|
@ -36,9 +36,10 @@ class ParkingSpaceAttributes extends Model |
|
|
|
|
|
|
|
public static function getTypeList(): array |
|
|
|
{ |
|
|
|
return self::query()->where('is_default', 0)->get()->select( |
|
|
|
$data = self::query()->where('is_default', 0)->get()->select( |
|
|
|
['id', 'attributes'] |
|
|
|
)->each(function ($item) { |
|
|
|
)->toArray(); |
|
|
|
foreach ($data as &$item) { |
|
|
|
$item['attributes'] |
|
|
|
= AdminTranslationService::getTranslationTypeName( |
|
|
|
$item['id'], |
|
|
|
@ -46,7 +47,8 @@ class ParkingSpaceAttributes extends Model |
|
|
|
$item['attributes'] |
|
|
|
); |
|
|
|
return $item; |
|
|
|
})->toArray(); |
|
|
|
} |
|
|
|
return $data; |
|
|
|
} |
|
|
|
|
|
|
|
public static function getAttr($id) |
|
|
|
|