Skip to content

Commit

Permalink
fix: Fixed error when config is cached (#3347)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roboroads authored Aug 25, 2023
1 parent 2d9aa54 commit 54d2409
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MediaLibraryServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Spatie\MediaLibrary\MediaCollections\Commands\ClearCommand;
use Spatie\MediaLibrary\MediaCollections\Filesystem;
use Spatie\MediaLibrary\MediaCollections\MediaRepository;
use Spatie\MediaLibrary\MediaCollections\Models\Media;
use Spatie\MediaLibrary\MediaCollections\Models\Observers\MediaObserver;
use Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\TinyPlaceholderGenerator;
use Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\WidthCalculator;
Expand All @@ -18,7 +19,7 @@ public function boot()
{
$this->registerPublishables();

$mediaClass = config('media-library.media_model');
$mediaClass = config('media-library.media_model', Media::class);

$mediaClass::observe(new MediaObserver());

Expand Down

0 comments on commit 54d2409

Please sign in to comment.