src/Press/Models/Post.php
public function getEntityObject($slug = null)
    {
        if (! is_null($this->entity)) {
            return $this->entity;
        }

        return $this->getEntity($slug ?? $this->getAttribute('type'))->entity;
    }
public function getEntityObject($slug = null)
    {
        if (! is_null($this->entity)) {
            return $this->entity;
        }

        return $this->getEntity($slug ?? $this->getAttribute('type'))->entity;
    }
public function getEntityObject ( $ slug = null ) { if ( ! is_null ( $ this -> entity ) ) { return $ this -> entity ; } return $ this -> getEntity ( $ slug ?? $ this -> getAttribute ( 'type' ) ) -> entity ; }
Get Behavior Class.

@param string|null $slug

@throws \Throwable|EntityTypeException

@return \Orchid\Press\Entities\Many|\Orchid\Press\Entities\Single|null
Get Behavior Class .