FastAdmin

object(Closure) 数组的用法

[$where, $sort, $order, $offset, $limit] = $this->buildparams();

$fnc = new ReflectionFunction($where);
$map = $fnc->getStaticVariables();

var_dump($map['where']);

在当前控制器使用$this->model->where()->find()

/**
     * @var \app\admin\model\User
     */
    protected $model = null;

    public function _initialize()
    {
        parent::_initialize();
        $this->model = model(   'app\admin\model\User');
    }
文章作者: ABin
本文链接:
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 ABin!