Skip to content

Commit

Permalink
Extract migrations to protected method
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev committed Feb 16, 2018
1 parent 051ca85 commit 36d039c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Providers/LoveServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function boot()
$this->registerConsoleCommands();
$this->registerObservers();
$this->registerPublishes();
$this->loadMigrationsFrom(__DIR__.'/../../database/migrations');
$this->registerMigrations();
}

/**
Expand Down Expand Up @@ -102,4 +102,16 @@ protected function registerPublishes()
], 'migrations');
}
}

/**
* Register the Love migrations.
*
* @return void
*/
protected function registerMigrations(): void
{
if ($this->app->runningInConsole()) {
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
}
}
}

0 comments on commit 36d039c

Please sign in to comment.