'正常', self::STATUS_PAUSE => '暂停' ]; const TYPE_STOP_BIKE = 2; const TYPE_NO_STOP_BIKE = 1; public static $typeMaps = [ self::TYPE_STOP_BIKE => '停车区', self::TYPE_NO_STOP_BIKE => '禁停区' ]; public function getParkingCentreAttribute($value) { return js2php($value); } public function getParkingFenceAttribute($value) { return js2php($value); } public function scopeActive($query) { return $query->where('status', self::STATUS_OK); } }