mirror of
https://github.com/pelican-dev/panel.git
synced 2026-05-04 18:00:48 +03:00
Plugin system (#1866)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user