项目初始化
This commit is contained in:
20
app/admin/model/AdminRule.php
Normal file
20
app/admin/model/AdminRule.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use support\think\Model;
|
||||
|
||||
class AdminRule extends Model
|
||||
{
|
||||
protected string $table = 'admin_rule';
|
||||
protected string $pk = 'id';
|
||||
protected bool $autoWriteTimestamp = true;
|
||||
|
||||
public function setComponentAttr($value)
|
||||
{
|
||||
if ($value) $value = str_replace('\\', '/', $value);
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user