protected function onBeforeRead() { /** @var DataModel $model */ $model = $this->getModel(); $this->item = $model->findOrFail(); }