RFFRED
4 months ago
1358
7
General

Issue with spatie/laravel-medialibrary

Posted 4 months ago by RFFRED

Hello,

I am having issues installing the spatie/laravel-medialibrary . Running composer :

composer require "spatie/laravel-medialibrary:^7.0.0"

gives me

Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

Symfony\Component\Debug\Exception\FatalThrowableError : Class name must be a valid object or a string

at C:\projects\projects\fcms1\vendor\spatie\laravel-medialibrary\src\MediaLibraryServiceProvider.php:33
29| ], 'views');
30|
31| $mediaClass = config('medialibrary.media_model');
32|

33| $mediaClass::observe(new MediaObserver());
34|
35| $this->loadViewsFrom(DIR.'/../resources/views', 'medialibrary');
36| }
37|

Exception trace:

1 Spatie\MediaLibrary\MediaLibraryServiceProvider::boot()
C:\projects\projects\fcms1\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:32

2 call_user_func_array([])
C:\projects\projects\fcms1\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:32

Please use the argument -v to see more details.
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
```

I have logged an issue on Github, but who knows when anyone will look at it.

Anyway, has anyone reading this experienced this issue lately?

I am on Laravel 6.6

Cheers

Please sign in or create an account to participate in this conversation.