停车场管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

38 lines
756 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class AdminConfigs extends Model
{
use HasFactory, SoftDeletes;
protected $fillable = [
'content',
'user_id'
];
protected $hidden = [
'deleted_at',
'updated_at'
];
protected $casts = [
'content' => 'json'
];
public static function getRepairColor()
{
$content = AdminConfigs::query()->where(
'name',
'parking_repair'
)->value('content');
if ($content && isset($content['color'])) {
return $content['color'];
}
return '';
}
}