|
|
|
@ -34,9 +34,13 @@ class ParkingSpaceAttributes extends Model |
|
|
|
)->toArray(); |
|
|
|
} |
|
|
|
|
|
|
|
public static function getTypeList(): array |
|
|
|
public static function getTypeList($is_default = 1): array |
|
|
|
{ |
|
|
|
$data = self::query()->where('is_default', 0)->get()->select( |
|
|
|
$model = self::query(); |
|
|
|
if ($is_default == 1) { |
|
|
|
$model->where('is_default', 0); |
|
|
|
} |
|
|
|
$data = $model->get()->select( |
|
|
|
['id', 'attributes'] |
|
|
|
)->toArray(); |
|
|
|
foreach ($data as $key => $item) { |
|
|
|
|