Plugin system (#1866)

This commit is contained in:
Boy132
2025-12-20 00:32:13 +01:00
committed by GitHub
parent 2ab4c81e2a
commit 242a75bf3d
33 changed files with 1875 additions and 11 deletions

View File

@@ -2,6 +2,7 @@
namespace Database\Seeders;
use App\Models\Plugin;
use App\Models\Role;
use Illuminate\Database\Seeder;
@@ -15,5 +16,16 @@ class DatabaseSeeder extends Seeder
$this->call(EggSeeder::class);
Role::firstOrCreate(['name' => Role::ROOT_ADMIN]);
$plugins = Plugin::query()->orderBy('load_order')->get();
foreach ($plugins as $plugin) {
if (!$plugin->shouldLoad()) {
continue;
}
if ($seeder = $plugin->getSeeder()) {
$this->call($seeder);
}
}
}
}