public function tagsWithGroup(string $group = null): Collection
    {
        return $this->tags->filter(function (Tag $tag) use ($group) {
            return $tag->group === $group;
        });
    }
public function tagsWithGroup(string $group = null): Collection
    {
        return $this->tags->filter(function (Tag $tag) use ($group) {
            return $tag->group === $group;
        });
    }
public function tagsWithGroup ( string $ group = null ) : Collection { return $ this -> tags -> filter ( function ( Tag $ tag ) use ( $ group ) { return $ tag -> group === $ group ; } ) ; }
Filter tags with group.

@param string|null $group

@return \Illuminate\Database\Eloquent\Collection
Filter tags with group .