public function run() { $class = Log::childClass() . 'Search'; /** @var LogSearch $searchModel */ $searchModel = new $class(); $dataProvider = $searchModel->search([$searchModel->formName() => ['model_name' => get_class($this->model), 'model_id' => $this->model->primaryKey]]); $dataProvider->sort = false; $dataProvider->query->orderBy(['created_at' => SORT_DESC]); return $this->render($this->viewFile, compact('dataProvider')); }