diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100755 index a8c515859..000000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,42 +0,0 @@ -command('inspire') - // ->hourly(); - } - - /** - * Register the commands for the application. - * - * @return void - */ - protected function commands() - { - $this->load(__DIR__.'/Commands'); - - require base_path('routes/console.php'); - } -} diff --git a/app/Console/Commands/BagistoVersion.php b/packages/Webkul/Core/src/Console/Commands/BagistoVersion.php similarity index 94% rename from app/Console/Commands/BagistoVersion.php rename to packages/Webkul/Core/src/Console/Commands/BagistoVersion.php index 6e0b5c04f..660d9f420 100644 --- a/app/Console/Commands/BagistoVersion.php +++ b/packages/Webkul/Core/src/Console/Commands/BagistoVersion.php @@ -1,6 +1,6 @@ registerFacades(); + + $this->registerCommands(); } /** @@ -66,6 +70,18 @@ class CoreServiceProvider extends ServiceProvider }); } + /** + * Register the console commands of this package + * + * @return void + */ + protected function registerCommands(): void + { + if ($this->app->runningInConsole()) { + $this->commands([BagistoVersion::class, Install::class,]); + } + } + /** * Register factories. * diff --git a/app/Console/Commands/GenerateProducts.php b/packages/Webkul/Product/src/Console/Commands/GenerateProducts.php similarity index 98% rename from app/Console/Commands/GenerateProducts.php rename to packages/Webkul/Product/src/Console/Commands/GenerateProducts.php index 5a94f7d4b..06d5156d9 100644 --- a/app/Console/Commands/GenerateProducts.php +++ b/packages/Webkul/Product/src/Console/Commands/GenerateProducts.php @@ -1,6 +1,6 @@ app->runningInConsole()) { - $this->commands([PriceUpdate::class,]); + $this->commands([PriceUpdate::class, GenerateProducts::class,]); } }