Just updating from 6.6 to 7. and getting error in Laravel 5.6: MediaLibraryServiceProvider.php line 30:
Class 'Spatie\MediaLibrary\Media' not found
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
Try to clear bootstrap/cache directory.
Please refer to the UPGRADING guide https://github.com/spatie/laravel-medialibrary/blob/master/UPGRADING.md#from-v6-to-v7
The model class has been moved to the Spatie\MediaLibrary\Models\Media FQCN.
ah, updated the model in config/medialibrary.php file
I'd the same issue, locally it was fixed by editing the config/medialibrary.php file but when deploying I was keep getting the error because php artisan config:clear kept failing. Removing the cached config file manually solved the problem: rm bootstrap/cache/config.php.
Most helpful comment
ah, updated the model in config/medialibrary.php file