wallet handling 2

This commit is contained in:
2026-06-15 14:59:52 +03:30
parent c94e6b0424
commit fae79f8922
2 changed files with 45 additions and 1 deletions
+17 -1
View File
@@ -2,6 +2,9 @@
namespace App\Providers;
use App\Console\Commands\MigrateCommand;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\MigrationServiceProvider;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@@ -23,6 +26,19 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
//
if (! $this->app->runningInConsole()) {
return;
}
$this->app->extend('command.migrate', function ($command, $app) {
if (! $app->bound('migrator')) {
(new MigrationServiceProvider($app))->register();
}
return new MigrateCommand(
$app->make('migrator'),
$app->make(Dispatcher::class)
);
});
}
}