Last active
September 17, 2025 15:14
-
-
Save godismyjudge95/bdab9a60850a93af1602f228a37f895d to your computer and use it in GitHub Desktop.
Extend migrate command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Providers; | |
| use App\Console\Commands\Migrate; | |
| use Illuminate\Events\Dispatcher; | |
| use Illuminate\Support\ServiceProvider; | |
| class AppServiceProvider extends ServiceProvider | |
| { | |
| public function register(): void {} | |
| public function boot(): void | |
| { | |
| $this->app->singleton(Migrate::class, function ($app) { | |
| return new Migrate($app['migrator'], $app[Dispatcher::class]); | |
| }); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Console\Commands; | |
| use Illuminate\Database\Console\Migrations\MigrateCommand; | |
| class Migrate extends MigrateCommand | |
| { | |
| public function handle() | |
| { | |
| echo 'test'; | |
| exit(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment