初始化
This commit is contained in:
23
addons/webman/model/AdminMenu.php
Normal file
23
addons/webman/model/AdminMenu.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace addons\webman\model;
|
||||
|
||||
use addons\webman\traits\HasDateTimeFormatter;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AdminMenu extends Model
|
||||
{
|
||||
use HasDateTimeFormatter;
|
||||
protected $fillable = ['name', 'icon', 'url', 'plugin', 'pid', 'sort', 'status', 'open'];
|
||||
|
||||
public function __construct(array $attributes = [])
|
||||
{
|
||||
parent::__construct($attributes);
|
||||
$this->setTable(plugin()->webman->config('database.menu_table'));
|
||||
}
|
||||
|
||||
protected function getNameAttribute($value)
|
||||
{
|
||||
return admin_trans('menu.titles.' . $value, $value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user