定制 menchhub/filament-settings 二次开发

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

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

menchhub/filament-settings

最新稳定版本:v1.0.0

Composer 安装命令:

composer require menchhub/filament-settings

包简介

Menchhub's Filament Settings package with Spatie Settings integration

README 文档

README

A Filament v3 package that integrates Spatie Laravel Settings with Filament Admin Panel, allowing you to manage application settings easily.

📸 Preview

Filament Settings Plugin

📥 Installation

Install the package via Composer:

composer require menchhub/filament-settings

Publish the configuration file:

php artisan vendor:publish --tag=filament-settings-config

Run the migration to create the settings table:

php artisan migrate

Optionally: If a user wants to edit the migration, publish it manually:

php artisan vendor:publish --tag=filament-settings-migrations

This copies the migration into their database/migrations/ folder.

Optionally Publish the asset folder:

php artisan vendor:publish --tag=filament-settings-assets

Optionally Publish the theme:

php artisan vendor:publish --tag=filament-settings-theme

⚙️ Configuration

After publishing the config file, you can find it in:
📌 config/filament-settings.php

Config

return [
    /*
     * Available Filament settings pages to register.
     * These should extend `Filament\Pages\Page`.
     */
    'pages' => [
        \Menchhub\FilamentSettings\Filament\Pages\SiteSettingsPage::class,
    ],

    /*
     * Register the settings classes for Spatie Settings.
     * These should extend `Spatie\LaravelSettings\Settings`.
     */
    'settings' => [
        \Menchhub\FilamentSettings\Settings\SiteSettings::class,
    ],
];

🔹 How It Works

  • The package automatically registers settings pages defined in config/filament-settings.php.
  • Any new settings pages added here will be dynamically loaded in Filament.

🖌️ Customizing Plugin Appearance

You can customize how the settings plugin appears in the Filament navigation menu.

📌 File Path: app/Providers/Filament/AdminPanelProvider.php

🔹 Available Customization Options

MenchFilamentSettingsPlugin::make()
    ->setSort(3) // Sort order in menu (lower = higher)
    ->setIcon('heroicon-o-cog') // Heroicons name
    ->setNavigationGroup('Settings') // Group inside the sidebar
    ->setTitle('Main Settings') // Title of the page
    ->setNavigationLabel('Mench Settings'); // Label in the sidebar

✅ Now Filament automatically loads the new settings!

✨ Features

Fully integrates with Filament v3
Uses Spatie Laravel Settings for persistence
Automatically registers new settings pages
Easily configurable via config/filament-settings.php

💡 Contributing

Feel free to submit issues, feature requests, or pull requests to improve the package! 🚀

📄 License

This package is open-sourced software licensed under the MIT license.

🏢 About Mench Hub

This package is maintained by Menchhub.
For support, visit our website or contact us at support@menchhub.com.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-26