mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
improve plugin store
This commit is contained in:
@@ -14,12 +14,10 @@ use Illuminate\Console\Command;
|
||||
use NexusPlugin\Menu\Filament\MenuItemResource\Pages\ManageMenuItems;
|
||||
use NexusPlugin\Menu\MenuRepository;
|
||||
use NexusPlugin\Menu\Models\MenuItem;
|
||||
use NexusPlugin\Permission\Models\Permission;
|
||||
use NexusPlugin\Permission\Models\Role;
|
||||
use NexusPlugin\PostLike\PostLikeRepository;
|
||||
use NexusPlugin\StickyPromotion\Models\StickyPromotion;
|
||||
use NexusPlugin\StickyPromotion\Models\StickyPromotionParticipator;
|
||||
use NexusPlugin\Tracker\TrackerRepository;
|
||||
use NexusPlugin\Work\Models\RoleWork;
|
||||
use NexusPlugin\Work\WorkRepository;
|
||||
use Stichoza\GoogleTranslate\GoogleTranslate;
|
||||
@@ -57,9 +55,9 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$a = [1,2,3];
|
||||
$b = array_slice($a, 0, 2);
|
||||
dd($a, $b);
|
||||
$rep = new MenuRepository();
|
||||
$result = \Nexus\Plugin\Plugin::listEnabled();
|
||||
dd($result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
trait ExecuteCommandTrait
|
||||
{
|
||||
protected function executeCommand($command)
|
||||
{
|
||||
$this->info("Running $command ...");
|
||||
$result = exec($command, $output, $result_code);
|
||||
do_log(sprintf('command: %s, result_code: %s, output: %s, result: %s', $command, $result_code, json_encode($output), $result));
|
||||
if ($result_code != 0) {
|
||||
throw new \RuntimeException(json_encode($output));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user