public function allTags()
    {
        $tags = [];

        if (app()->getLocale() !== config('cms.default-language', 'en')) {
            $blogs = $this->translationRepo->getEntitiesByTypeAndLang(app()->getLocale(), 'Grafite\Cms\Models\Blog');
        } else {
            $blogs = $this->model->orderBy('published_at', 'desc')->get();
        }

        foreach ($blogs as $blog) {
            foreach (explode(',', $blog->tags) as $tag) {
                if ($tag !== '') {
                    array_push($tags, $tag);
                }
            }
        }

        return collect(array_unique($tags));
    }
public function allTags()
    {
        $tags = [];

        if (app()->getLocale() !== config('cms.default-language', 'en')) {
            $blogs = $this->translationRepo->getEntitiesByTypeAndLang(app()->getLocale(), 'Grafite\Cms\Models\Blog');
        } else {
            $blogs = $this->model->orderBy('published_at', 'desc')->get();
        }

        foreach ($blogs as $blog) {
            foreach (explode(',', $blog->tags) as $tag) {
                if ($tag !== '') {
                    array_push($tags, $tag);
                }
            }
        }

        return collect(array_unique($tags));
    }
public function allTags ( ) { $ tags = [ ] ; if ( app ( ) -> getLocale ( ) !== config ( 'cms.default-language' , 'en' ) ) { $ blogs = $ this -> translationRepo -> getEntitiesByTypeAndLang ( app ( ) -> getLocale ( ) , 'Grafite\Cms\Models\Blog' ) ; } else { $ blogs = $ this -> model -> orderBy ( 'published_at' , 'desc' ) -> get ( ) ; } foreach ( $ blogs as $ blog ) { foreach ( explode ( ',' , $ blog -> tags ) as $ tag ) { if ( $ tag !== '' ) { array_push ( $ tags , $ tag ) ; } } } return collect ( array_unique ( $ tags ) ) ; }
Gets all tags of an entry

@return Illuminate\Support\Collection
Gets all tags of an entry