Plugin-System; Neuigkeiten und Termine als mitgelieferte Plugins
- Plugins nach WordPress-Prinzip: plugin.json-Manifest mit Versions- und Abhängigkeitsprüfung, eigenes PSR-4-Autoloading, register()/boot(), activate()/deactivate()/uninstall(), Migrationen, Routen und Views je Plugin - plugins-core/ (mitgeliefert, aktiv bis zur Deaktivierung) und plugins/ (Kunden-Plugins, geschützt vor Updates, inaktiv bis zur Aktivierung) - Zustand in storage/app/plugins.json – Laden ohne Datenbankabfrage - Wiederherstellungsmodus: Ausnahmen und Fatal Errors beim Laden deaktivieren das Plugin, das Portal bleibt erreichbar - Hooks (Actions/Filter mit Prioritäten) und Registries für Navigation, Startseiten-Kacheln, Rechte und Admin-Seiten (Filament-Discovery) - Admin-Seite „Plugins“: aktivieren, deaktivieren, per ZIP installieren (ZIP-Slip-Schutz), löschen mit oder ohne Daten; abschaltbar per INHAUS_DISALLOW_FILE_MODS - Startseite komplett aus Kacheln; Plugin-Seiten als „slug::Seite“ - Version 0.3.0 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cc0020458f
commit
28ef1e4a20
155 changed files with 2762 additions and 573 deletions
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Dashboard\CoreWidgets;
|
||||
use App\Dashboard\Widgets;
|
||||
use App\Models\User;
|
||||
use App\Support\Avatars;
|
||||
use App\Support\BackgroundTasks;
|
||||
use App\Support\Branding;
|
||||
use App\Support\Installation;
|
||||
use App\Support\License\LicenseStore;
|
||||
use App\Support\Navigation;
|
||||
use App\Support\QuickLinks;
|
||||
use App\Support\Settings;
|
||||
use App\Support\Update\InstalledVersion;
|
||||
|
|
@ -36,7 +37,6 @@ class AppServiceProvider extends ServiceProvider
|
|||
$this->app->singleton(Settings::class);
|
||||
$this->app->singleton(Branding::class);
|
||||
$this->app->singleton(Avatars::class);
|
||||
$this->app->singleton(Navigation::class);
|
||||
$this->app->singleton(QuickLinks::class);
|
||||
$this->app->singleton(LicenseStore::class);
|
||||
$this->app->singleton(BackgroundTasks::class);
|
||||
|
|
@ -47,11 +47,14 @@ class AppServiceProvider extends ServiceProvider
|
|||
|
||||
public function boot(): void
|
||||
{
|
||||
CoreWidgets::register($this->app->make(Widgets::class));
|
||||
|
||||
// N+1-Abfragen in Entwicklung und Tests sofort sichtbar machen (docs/PLAN.md, Performance).
|
||||
Model::preventLazyLoading(! $this->app->isProduction());
|
||||
|
||||
// Vorläufig: Administratoren über is_admin – wird in Phase 2 durch Rollen ersetzt.
|
||||
Gate::define('admin', fn (User $user) => $user->is_admin && $user->is_active);
|
||||
Gate::before(fn (User $user) => $user->is_admin && $user->is_active ? true : null);
|
||||
|
||||
Password::defaults(fn () => Password::min(10)->letters()->numbers());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue