src/Mediable.php
public function getTagsForMedia(Media $media)
    {
        $this->rehydrateMediaIfNecessary();

        return $this->media->reduce(function ($carry, Media $item) use ($media) {
            if ($item->getKey() === $media->getKey()) {
                $carry[] = $item->pivot->tag;
            }

            return $carry;
        }, []);
    }
public function getTagsForMedia(Media $media)
    {
        $this->rehydrateMediaIfNecessary();

        return $this->media->reduce(function ($carry, Media $item) use ($media) {
            if ($item->getKey() === $media->getKey()) {
                $carry[] = $item->pivot->tag;
            }

            return $carry;
        }, []);
    }
public function getTagsForMedia ( Media $ media ) { $ this -> rehydrateMediaIfNecessary ( ) ; return $ this -> media -> reduce ( function ( $ carry , Media $ item ) use ( $ media ) { if ( $ item -> getKey ( ) === $ media -> getKey ( ) ) { $ carry [ ] = $ item -> pivot -> tag ; } return $ carry ; } , [ ] ) ; }
Get a list of all tags that the media is attached to.
@param  \Plank\Mediable\Media  $media
@return string[]
Get a list of all tags that the media is attached to .