Skip to content

Commit

Permalink
Explain in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cl8n committed Aug 14, 2023
1 parent 68b4bd8 commit 1fd5f10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Providers/MigrationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class MigrationServiceProvider extends ServiceProvider
{
public function boot(): void
{
// Before running a batch of migrations, require all migration files.
// This lets migrations depend on other migrations' classes declared in
// the global scope, even when those migrations aren't going to be run
// in this batch.
Event::listen(MigrationsStarted::class, function () {
/** @var \Illuminate\Database\Migrations\Migrator $migrator */
$migrator = $this->app->make('migrator');
Expand Down

0 comments on commit 1fd5f10

Please sign in to comment.