noith/orchid-settings

Flexible settings CRUD for Laravel and Orchid

Maintainers

Package info

gitlab.com/noith/orchid-settings

Issues

Type:package

pkg:composer/noith/orchid-settings

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.0 2026-06-04 23:12 UTC

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