public function getContext()
    {
        if ($this->pageContext) {
            return $this->pageContext;
        }

        $current = \Route::getCurrentRoute();

        if (!$current) {
            return 'default';
        }

        if ($current->getName()) {
            return $this->pageContext = $current->getName();
        }

        $action = $current->getAction();
        if (array_key_exists('controller', $action)) {
            return $this->pageContext = $action['controller'];
        }

        return $this->pageContext = implode('/', array_map(['Str', 'slug'], explode('/', $current->getUri())));
    }
public function getContext()
    {
        if ($this->pageContext) {
            return $this->pageContext;
        }

        $current = \Route::getCurrentRoute();

        if (!$current) {
            return 'default';
        }

        if ($current->getName()) {
            return $this->pageContext = $current->getName();
        }

        $action = $current->getAction();
        if (array_key_exists('controller', $action)) {
            return $this->pageContext = $action['controller'];
        }

        return $this->pageContext = implode('/', array_map(['Str', 'slug'], explode('/', $current->getUri())));
    }
public function getContext ( ) { if ( $ this -> pageContext ) { return $ this -> pageContext ; } $ current = \ Route :: getCurrentRoute ( ) ; if ( ! $ current ) { return 'default' ; } if ( $ current -> getName ( ) ) { return $ this -> pageContext = $ current -> getName ( ) ; } $ action = $ current -> getAction ( ) ; if ( array_key_exists ( 'controller' , $ action ) ) { return $ this -> pageContext = $ action [ 'controller' ] ; } return $ this -> pageContext = implode ( '/' , array_map ( [ 'Str' , 'slug' ] , explode ( '/' , $ current -> getUri ( ) ) ) ) ; }
Get the page's context

@return string
Get the page s context