manggala / laravel-manifest
Production-ready, schema-driven, UI-agnostic configuration platform for Laravel applications.
Requires
- php: ^8.2 || ^8.3 || ^8.4
- illuminate/cache: ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/console: ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/contracts: ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/database: ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/encryption: ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/http: ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^10.0 || ^11.0 || ^12.0 || ^13.0
Requires (Dev)
- larastan/larastan: ^2.0 || ^3.0
- laravel/pint: ^1.18
- orchestra/testbench: ^8.0 || ^9.0 || ^10.0
- pestphp/pest: ^2.0 || ^3.0
- pestphp/pest-plugin-laravel: ^2.0 || ^3.0
README
Laravel Manifest (manggala/laravel-manifest) is a production-ready, schema-driven, UI-agnostic configuration platform and manifest manager for Laravel applications.
Unlike simple key-value packages, Laravel Manifest provides an extensible schema engine that automatically manages database persistence, validation, dynamic UI rendering, REST APIs, caching, native encryption, RBAC authorization, and ecosystem package discovery.
๐ Key Features
- Multi-Version Compatibility: Compatible with PHP 8.2, 8.3, 8.4 and Laravel 10.x, 11.x, 12.x, 13.x.
- Schema First Architecture: Define configuration schemas once in PHP, and let the engine generate UI, validation, REST APIs, and database migrations.
- UI Agnostic Adapter System: Core engine is frontend-decoupled and provides built-in adapters for Blade, Livewire, Inertia React, and API Only.
- Pluggable Storage Drivers: Switch seamlessly between Database, JSON, and Redis storage drivers.
- Automatic Caching & Invalidation: High-performance caching with instant automatic cache purging upon setting updates.
- Native Encryption Subsystem: Automatic encryption for sensitive values (passwords, API keys, OAuth secrets) using Laravel
Crypt. - RBAC & Authorization Drivers: Native support for Spatie Permission, Laravel Gates, Policies, and Middleware.
- Audit Trail & Rollback History: Track full setting change history (
old_value,new_value,user_id,ip_address) with rollback capabilities. - Artisan Wizard & Diagnostic Doctor: Interactive
php artisan settings:installsetup wizard andphp artisan settings:doctorhealth check diagnostics. - Manggala Ecosystem Discovery: Package discovery engine (
Settings::discover()) for auto-registering settings from packages likelaravel-dashboard-builder.
๐ฆ Installation
Install the package via Composer:
composer require manggala/laravel-manifest
Run the interactive installation wizard:
php artisan settings:install
Optionally publish resources manually:
php artisan settings:publish --tag=config php artisan settings:publish --tag=migrations
๐ Quick Start (Fluent Schema API)
Define your application settings fluently in a Service Provider or package bootstrap:
use Manggala\Settings\Facades\Settings; use Manggala\Settings\Schema\SettingsGroup; Settings::group('General', function (SettingsGroup $group) { $group->text('site_name') ->label('Site Name') ->default('My Laravel Application') ->required(); $group->password('smtp_password') ->label('SMTP Password') ->encrypted(); $group->toggle('maintenance_mode') ->label('Maintenance Mode') ->default(false); });
Accessing & Updating Settings
// Retrieve a setting value via helper or Facade $siteName = setting('general.site_name', 'Default Site'); // Store a setting value setting(['general.site_name' => 'Acme Corp']); // Check existence if (Settings::has('general.site_name')) { // ... } // Delete setting Settings::forget('general.site_name');
๐ Authorization (RBAC)
Protect setting groups using Spatie roles/permissions or Laravel Gates:
Settings::group('Mail') ->roles(['super-admin', 'admin']) ->permissions(['manage-mail-settings']);
๐ฅ Health Diagnostic Doctor Command
Run the doctor diagnostic command to inspect storage, cache, encryption, and permission status:
php artisan settings:doctor
๐งช Testing & Quality Assurance
Run the Pest PHP test suite:
vendor/bin/pest
Format code styling with Laravel Pint:
vendor/bin/pint
Run static analysis:
vendor/bin/phpstan analyse
๐ License
The MIT License (MIT). Please see LICENSE for more information.