8000 Add migrate:fresh command · laravel/lumen-framework@ef47bfe · GitHub
[go: up one dir, main page]

Skip to content

Commit ef47bfe

Browse files
committed
Add migrate:fresh command
Signed-off-by: Mulia Arifandi Nasution <mul14.net@gmail.com>
1 parent f5038f2 commit ef47bfe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Console/ConsoleServiceProvider.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Illuminate\Queue\Console\FlushFailedCommand as FlushFailedQueueCommand;
2222
use Illuminate\Queue\Console\ForgetFailedCommand as ForgetFailedQueueCommand;
2323
use Illuminate\Database\Console\Migrations\ResetCommand as MigrateResetCommand;
24+
use Illuminate\Database\Console\Migrations\FreshCommand as MigrateFreshCommand;
2425
use Illuminate\Database\Console\Migrations\StatusCommand as MigrateStatusCommand;
2526
use Illuminate\Database\Console\Migrations\InstallCommand as MigrateInstallCommand;
2627
use Illuminate\Database\Console\Migrations\RefreshCommand as MigrateRefreshCommand;
@@ -46,6 +47,7 @@ class ConsoleServiceProvider extends ServiceProvider
4647
'ClearResets' => 'command.auth.resets.clear',
4748
'Migrate' => 'command.migrate',
4849
'MigrateInstall' => 'command.migrate.install',
50+
'MigrateFresh' => 'command.migrate.fresh',
4951
'MigrateRefresh' => 'command.migrate.refresh',
5052
'MigrateReset' => 'command.migrate.reset',
5153
'MigrateRollback' => 'command.migrate.rollback',
@@ -193,6 +195,18 @@ protected function registerMigrateMakeCommand()
193195
});
194196
}
195197

198+
/**
199+
* Register the command.
200+
*
201+
* @return void
202+
*/
203+
protected function registerMigrateFreshCommand()
204+
{
205+
$this->app->singleton('command.migrate.fresh', function () {
206+
return new MigrateFreshCommand;
207+
});
208+
}
209+
196210
/**
197211
* Register the command.
198212
*

0 commit comments

Comments
 (0)
0