$media->name()

Returns the name of the file without extension

  • return (string)

Example

echo $media->name();
// my-image