定制 noith/orchid-settings 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

noith/orchid-settings

Composer 安装命令:

composer require noith/orchid-settings

包简介

Flexible settings CRUD for Laravel and Orchid

README 文档

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

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固