improve plugin store

This commit is contained in:
xiaomlove
2025-05-05 18:24:17 +07:00
parent 5b71976624
commit fb88455323
15 changed files with 282 additions and 55 deletions
+3 -5
View File
@@ -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);
}
}
-16
View File
@@ -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));
}
}
}