Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
wangta69 committed Oct 15, 2024
1 parent 75ac5bf commit 1c4d439
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Installation
```
composer require wangta69/laravel-editor
php artisan editor:install
php artisan pondol:install editor
```

## Tests
Expand Down
3 changes: 1 addition & 2 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class InstallCommand extends Command
*
* @var string
*/
protected $signature = 'editor:install';
protected $signature = 'pondol:install-editor';

/**
* The console command description.
Expand Down Expand Up @@ -49,5 +49,4 @@ private function installLaravelEditor()
$this->info('The laravel editor installed successfully.');
}


}
64 changes: 64 additions & 0 deletions src/Console/InstallSimpleCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php

namespace Pondol\Editor\Console;

use Illuminate\Console\Command;
// use Illuminate\Filesystem\Filesystem;
// use Illuminate\Support\Str;
// use Symfony\Component\Process\PhpExecutableFinder;
// use Symfony\Component\Process\Process;

class InstallSimpleCommand extends Command
{
// use InstallsBladeStack;

/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'pondol:install {composer=editor} {type=full}'; // full, simple, skip

/**
* The console command description.
*
* @var string
*/
protected $description = 'Install the Laravel Editor controllers and resources';

// protected $composer, $type;


public function __construct()
{
parent::__construct();
}

public function handle()
{
$composer = $this->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.');
}

}

0 comments on commit 1c4d439

Please sign in to comment.