Skip to content

Commit

Permalink
fix: Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoberg committed Feb 5, 2021
1 parent b06e47c commit 005b560
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/MediaLibraryServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,6 @@ public function boot()
{
$this->registerPublishables();

if (! class_exists('CreateModelHasMediaTable')) {
$this->publishes([
__DIR__.'/../database/migrations/create_model_has_media_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_model_has_media_table.php'),
], 'migrations');
}

if (! class_exists('CreateModelHasMediaTable')) {
$this->publishes([
__DIR__.'/../database/migrations/create_model_has_media_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_model_has_media_table.php'),
], 'migrations');
}

$this->publishes([
__DIR__.'/../resources/views' => resource_path('views/vendor/medialibrary'),
], 'views');

$mediaClass = config('media-library.media_model');

$mediaClass::observe(new MediaObserver());
Expand Down Expand Up @@ -66,6 +50,12 @@ protected function registerPublishables(): void
], 'migrations');
}

if (! class_exists('CreateModelHasMediaTable')) {
$this->publishes([
__DIR__.'/../database/migrations/create_model_has_media_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_model_has_media_table.php'),
], 'migrations');
}

$this->publishes([
__DIR__.'/../resources/views' => resource_path('views/vendor/media-library'),
], 'views');
Expand Down

0 comments on commit 005b560

Please sign in to comment.