Skip to content

Commit

Permalink
fix command
Browse files Browse the repository at this point in the history
  • Loading branch information
komeylkalbali committed Mar 13, 2021
1 parent 35da9fd commit 5ed8aa2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/Commands/GenerateModuleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public function handle()
$this->warn("Path for creating =>". config_path());
die();
}

$this->callSilent('vendor:publish', ['--tag' => 'config' ,'--force' => true]);

$processes = count(\config()->get('modulegenerator') , COUNT_RECURSIVE);
$Progress = $this->getOutput()->createProgressBar($processes);
$Progress->setBarCharacter("/");
Expand Down
13 changes: 10 additions & 3 deletions src/Provider/GeneratorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Shetabit\ModuleGenerator\Provider;

use Illuminate\Support\ServiceProvider;
use Shetabit\ModuleGenerator\Commands\GenerateModuleCommand;
use Shetabit\ModuleGenerator\Contracts\ControllerGenerator;
use Shetabit\ModuleGenerator\Contracts\ForeignKeyGenerator;
use Shetabit\ModuleGenerator\Contracts\MigrationGenerator;
Expand Down Expand Up @@ -40,11 +41,17 @@ public function register()

public function boot()
{
if ($this->app->runningInConsole()) {
$this->commands([
GenerateModuleCommand::class,
]);
}

$this->publishes([
__DIR__.'/../Config/modulegenerator.php' => config_path('modulegenerator.php'),
]);
$this->publishes([
__DIR__.'/../Config/moduleConfig.php' => config_path('moduleConfig.php'),
]);

],'config');

}
}

0 comments on commit 5ed8aa2

Please sign in to comment.