blog/app/model/Menu.php

21 lines
527 B
PHP
Raw Permalink Normal View History

2024-06-08 15:54:41 +08:00
<?php
namespace app\model;
use think\Model;
class Menu extends Model
{
/**
* @var string
*/
protected $table = 'eb_menu';
protected $primaryKey = 'id';
public $timestamps = false;
public function getList()
{
$info = $this->field('id, parent_id, title, path, name, type, icon, component')->where('delete_time', 0)->where('type', 'menu')->select()->toArray();
if ($info) return show(true, '获取成功', $info);
return show(false, '暂无查询到的数据');
}
}