From 1c4d439b432d1257907592f69bc90078f03fe319 Mon Sep 17 00:00:00 2001 From: younghyeong ryu Date: Tue, 15 Oct 2024 16:32:20 +0900 Subject: [PATCH] t --- README.md | 2 +- src/Console/InstallCommand.php | 3 +- src/Console/InstallSimpleCommand.php | 64 ++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 src/Console/InstallSimpleCommand.php diff --git a/README.md b/README.md index 96f413b..6547354 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Installation ``` composer require wangta69/laravel-editor -php artisan editor:install +php artisan pondol:install editor ``` ## Tests diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index ba44e12..3a2a8c4 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -17,7 +17,7 @@ class InstallCommand extends Command * * @var string */ - protected $signature = 'editor:install'; + protected $signature = 'pondol:install-editor'; /** * The console command description. @@ -49,5 +49,4 @@ private function installLaravelEditor() $this->info('The laravel editor installed successfully.'); } - } diff --git a/src/Console/InstallSimpleCommand.php b/src/Console/InstallSimpleCommand.php new file mode 100644 index 0000000..3be60bd --- /dev/null +++ b/src/Console/InstallSimpleCommand.php @@ -0,0 +1,64 @@ +argument('composer'); + $type = $this->argument('type'); + if($composer === 'editor') { + switch($type) { + case 'full': + return $this->installLaravelEditor(); + default: + return; + } + } + return; + } + + + private function installLaravelEditor() + { + + \Artisan::call('storage:link'); + \Artisan::call('vendor:publish', [ + '--force'=> true, + '--provider' => 'Pondol\Editor\EditorServiceProvider' + ]); + $this->info('The laravel editor installed successfully.'); + } + +}