Browse Source

车位地图 车位属性显示

master
wanghongjun 1 week ago
parent
commit
71fafc1356
  1. 8
      app/Models/ParkingSpaceAttributes.php

8
app/Models/ParkingSpaceAttributes.php

@ -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) {

Loading…
Cancel
Save