21 lines
527 B
PHP
21 lines
527 B
PHP
<?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, '暂无查询到的数据');
|
|
}
|
|
} |