| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace app\admin\model\dao;
- use app\admin\traits\Curd;
- use think\facade\Db;
- class BaseDao
- {
- use Curd;
- protected $model;
- protected static $table;
- public static function getList()
- {
- return Db::table(self::$table)->select()->toArray();
- }
- public static function getById($id)
- {
- return Db::table(self::$table)->where(['id' => $id])->find();
- }
- }
|