33namespace Pharaonic \Laravel \Executor ;
44
55use Illuminate \Support \ServiceProvider ;
6+ use Pharaonic \Laravel \Executor \Classes \ExecutorManager ;
67use Pharaonic \Laravel \Executor \Classes \ExecutorPoolClass ;
78use Pharaonic \Laravel \Executor \Console \ExecuteCommand ;
89use Pharaonic \Laravel \Executor \Console \ExecuteFreshCommand ;
@@ -19,7 +20,10 @@ class ExecutorServiceProvider extends ServiceProvider
1920 */
2021 public function register ()
2122 {
22- $ this ->app ->singleton ('pharaonic.executor.executorPool ' , ExecutorPoolClass::class);
23+ $ this ->loadMigrationsFrom (__DIR__ . '/../database/migrations ' );
24+ $ this ->mergeConfigFrom (__DIR__ . '/../config/executor.php ' , 'pharaonic.executor ' );
25+
26+ $ this ->app ->singleton ('pharaonic.executor.manager ' , ExecutorManager::class);
2327 }
2428
2529 /**
@@ -30,23 +34,24 @@ public function register()
3034 public function boot ()
3135 {
3236 if ($ this ->app ->runningInConsole ()) {
33- // Publish Migrations
3437 $ this ->publishes (
3538 [__DIR__ . '/../database/migrations ' => database_path ('migrations ' )],
36- ['pharaonic ' , 'migrations ' , 'executor-migrations ' ]
39+ ['pharaonic ' , 'migrations ' , 'laravel-executor ' ]
3740 );
3841
39- // Load Migrations
40- $ this ->loadMigrationsFrom (__DIR__ . '/../database/migrations ' );
42+ $ this ->publishes (
43+ [__DIR__ . '/../config/executor.php ' => config_path ('pharaonic/executor.php ' )],
44+ ['pharaonic ' , 'config ' , 'laravel-executor ' ]
45+ );
4146
42- // Load Commands
43- $ this ->commands ([
44- ExecuteCommand::class,
45- ExecuteMakeCommand::class,
46- ExecuteRollbackCommand::class,
47- ExecuteFreshCommand::class,
48- ExecuteStatusCommand::class,
49- ]);
47+ // // Load Commands
48+ // $this->commands([
49+ // ExecuteCommand::class,
50+ // ExecuteMakeCommand::class,
51+ // ExecuteRollbackCommand::class,
52+ // ExecuteFreshCommand::class,
53+ // ExecuteStatusCommand::class,
54+ // ]);
5055 }
5156 }
5257}
0 commit comments