protected function initializeForModelRoute()
    {
        $routeHelper = $this->getRouteHelper();

        $this->modelSlug = $routeHelper->getModelSlugForCurrentRoute();

        if ( ! $this->modelSlug) {
            throw new RuntimeException("Could not determine model slug for route in request");
        }

        $this->modelInformation = $this->getModelInformationRepository()->getByKey($this->modelSlug);

        if ( ! $this->modelInformation) {
            throw new RuntimeException(
                "Could not load information for model slug '{$this->modelSlug}' in request"
            );
        }

        return $this;
    }
protected function initializeForModelRoute()
    {
        $routeHelper = $this->getRouteHelper();

        $this->modelSlug = $routeHelper->getModelSlugForCurrentRoute();

        if ( ! $this->modelSlug) {
            throw new RuntimeException("Could not determine model slug for route in request");
        }

        $this->modelInformation = $this->getModelInformationRepository()->getByKey($this->modelSlug);

        if ( ! $this->modelInformation) {
            throw new RuntimeException(
                "Could not load information for model slug '{$this->modelSlug}' in request"
            );
        }

        return $this;
    }
protected function initializeForModelRoute ( ) { $ routeHelper = $ this -> getRouteHelper ( ) ; $ this -> modelSlug = $ routeHelper -> getModelSlugForCurrentRoute ( ) ; if ( ! $ this -> modelSlug ) { throw new RuntimeException ( "Could not determine model slug for route in request" ) ; } $ this -> modelInformation = $ this -> getModelInformationRepository ( ) -> getByKey ( $ this -> modelSlug ) ; if ( ! $ this -> modelInformation ) { throw new RuntimeException ( "Could not load information for model slug '{$this->modelSlug}' in request" ) ; } return $ this ; }
Initializes form request and checks context expecting a model route.

@return $this
Initializes form request and checks context expecting a model route .