laravel-medialibrary change name of file
snippet in php

laravel-medialibrary change name of file

user6341

$yourModel->addMedia($pathToFile)->usingName('new name')->toMediaCollection();