31 lines
525 B
PHP
31 lines
525 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use App\Enums\GeneralConfigType;
|
||
|
|
use App\Traits\MiniCrudModel;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Kwaadpepper\Enum\Traits\CastsEnums;
|
||
|
|
|
||
|
|
class GeneralConfig extends Model
|
||
|
|
{
|
||
|
|
use CastsEnums;
|
||
|
|
use MiniCrudModel;
|
||
|
|
|
||
|
|
protected $enumCasts = [
|
||
|
|
'type' => GeneralConfigType::class
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'data' => 'array'
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $primaryKey = 'type';
|
||
|
|
|
||
|
|
public $incrementing = false;
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'type', 'data'
|
||
|
|
];
|
||
|
|
}
|