$file->name()

Returns the name of the file without extension

  • return (string)

Example

echo $page->file('my-image.jpg')->name();
// my-image