M1: 数据模型 + sablog:import 脚本(MySQL 8 验证通过,不迁移 trackback 等过时功能)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PluginRecord extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'vendor',
|
||||
'name',
|
||||
'version',
|
||||
'enabled',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'enabled' => 'boolean',
|
||||
];
|
||||
|
||||
public function getKeyAttribute(): string
|
||||
{
|
||||
return $this->vendor.'/'.$this->name;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user