protected function setCurrentModelClass()
    {
        if ( ! $this->router->isModelRoute()) {
            $this->currentModelClass = null;
            return $this;
        }

        $info = $this->repository->getByKey(
            $this->router->getModuleKeyForCurrentRoute()
        );

        if ($info) {
            $this->currentModelClass = $info->original_model ?: $info->model;
        } else {
            $this->currentModelClass = null;
        }

        $this->activeModelClass = $this->currentModelClass;

        return $this;
    }
protected function setCurrentModelClass()
    {
        if ( ! $this->router->isModelRoute()) {
            $this->currentModelClass = null;
            return $this;
        }

        $info = $this->repository->getByKey(
            $this->router->getModuleKeyForCurrentRoute()
        );

        if ($info) {
            $this->currentModelClass = $info->original_model ?: $info->model;
        } else {
            $this->currentModelClass = null;
        }

        $this->activeModelClass = $this->currentModelClass;

        return $this;
    }
protected function setCurrentModelClass ( ) { if ( ! $ this -> router -> isModelRoute ( ) ) { $ this -> currentModelClass = null ; return $ this ; } $ info = $ this -> repository -> getByKey ( $ this -> router -> getModuleKeyForCurrentRoute ( ) ) ; if ( $ info ) { $ this -> currentModelClass = $ info -> original_model ? : $ info -> model ; } else { $ this -> currentModelClass = null ; } $ this -> activeModelClass = $ this -> currentModelClass ; return $ this ; }
Sets the active and current model class based on the current request.
Sets the active and current model class based on the current request .