How can I use find method method in Entity Class?

I have two tables.
Bookmarks and Tags | Bookmarks has many Tags.
So In Bookmark Entity, I created two functions -

   public function getCountTags() {
         return count($this->tags)    
     }
  
    public function lastTagName() {
          return $this->tags->find('all')->last()->name;    
      }

so in the view 1st one is working , but second function is not working.