Plank\Mediable\Mediable::hasMedia PHP Метод

hasMedia() публичный Метод

Check if the model has any media attached to one or more tags.
public hasMedia ( string | array $tags, boolean $match_all = false ) : boolean
$tags string | array
$match_all boolean If false, will return true if the model has any attach media for any of the provided tags If true, will return true is the model has any media that are attached to all of provided tags simultaneously
Результат boolean
    public function hasMedia($tags, $match_all = false)
    {
        return count($this->getMedia($tags, $match_all)) > 0;
    }