src/Conversion/ConversionCollection.php
public function getByName(string $name): Conversion
    {
        $conversion = $this->first(function (Conversion $conversion) use ($name) {
            return $conversion->getName() === $name;
        });

        if (! $conversion) {
            throw InvalidConversion::unknownName($name);
        }

        return $conversion;
    }
public function getByName(string $name): Conversion
    {
        $conversion = $this->first(function (Conversion $conversion) use ($name) {
            return $conversion->getName() === $name;
        });

        if (! $conversion) {
            throw InvalidConversion::unknownName($name);
        }

        return $conversion;
    }
public function getByName ( string $ name ) : Conversion { $ conversion = $ this -> first ( function ( Conversion $ conversion ) use ( $ name ) { return $ conversion -> getName ( ) === $ name ; } ) ; if ( ! $ conversion ) { throw InvalidConversion :: unknownName ( $ name ) ; } return $ conversion ; }
Get a conversion by it's name.

@param string $name

@return mixed

@throws \Spatie\MediaLibrary\Exceptions\InvalidConversion
Get a conversion by it s name .