noith / orchid-settings
Flexible settings CRUD for Laravel and Orchid
v1.0.0
2026-06-04 23:12 UTC
Requires
- noith/settings: ^1.0
- orchid/platform: ^14.0
Requires (Dev)
- orchestra/testbench: ^9.0||^10.0
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-06-04 20:14:27 UTC
README
Flexible settings CRUD for Laravel Orchid.
Adds a tabbed settings screen to the Orchid admin panel. Tabs and fields are defined in your app's service provider. Persists values via noith/settings.
Installation
composer require noith/orchid-settings
php artisan optimize:clear
Grant the platform.settings permission to the roles that should access the settings screen.
Usage
Add the HasSettings trait to your existing PlatformProvider and define a settings() method returning tabs:
use Noith\OrchidSettings\Traits\HasSettings;
use Orchid\Platform\OrchidServiceProvider;
class PlatformProvider extends OrchidServiceProvider
{
use HasSettings;
public function settings(): array
{
return [
'General' => [
Input::make('site_name')->title('Site name'),
Input::make('site_email')->title('Email'),
],
'SEO' => [
Input::make('meta_title')->title('Meta title'),
Textarea::make('meta_description')->title('Meta description'),
],
];
}
}
No changes to boot() or registration are needed. The package discovers HasSettings automatically.
Reading settings
use Noith\Settings\Repositories\SettingsRepository;
$settings = app(SettingsRepository::class);
$siteName = $settings->get('site_name');
// or via helper
$siteName = settings('site_name');
License
MIT