public function allTags()
    {
        $tags = [];
        $images = $this->model->orderBy('created_at', 'desc')->where('is_published', 1)->get();

        foreach ($images as $image) {
            foreach (explode(',', $image->tags) as $tag) {
                if ($tag > '') {
                    array_push($tags, $tag);
                }
            }
        }

        return array_unique($tags);
    }
public function allTags()
    {
        $tags = [];
        $images = $this->model->orderBy('created_at', 'desc')->where('is_published', 1)->get();

        foreach ($images as $image) {
            foreach (explode(',', $image->tags) as $tag) {
                if ($tag > '') {
                    array_push($tags, $tag);
                }
            }
        }

        return array_unique($tags);
    }
public function allTags ( ) { $ tags = [ ] ; $ images = $ this -> model -> orderBy ( 'created_at' , 'desc' ) -> where ( 'is_published' , 1 ) -> get ( ) ; foreach ( $ images as $ image ) { foreach ( explode ( ',' , $ image -> tags ) as $ tag ) { if ( $ tag > '' ) { array_push ( $ tags , $ tag ) ; } } } return array_unique ( $ tags ) ; }
Returns all Images tags.

@return \Illuminate\Database\Eloquent\Collection|static[]
Returns all Images tags .