PHPackages                             quadrubo/filament-model-settings - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. quadrubo/filament-model-settings

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

quadrubo/filament-model-settings
================================

This is my package filament-model-settings

v2.0.1(3mo ago)1637.5k—9.2%11[1 PRs](https://github.com/Quadrubo/filament-model-settings/pulls)MITPHPPHP ^8.1CI passing

Since Nov 23Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/Quadrubo/filament-model-settings)[ Packagist](https://packagist.org/packages/quadrubo/filament-model-settings)[ Docs](https://github.com/quadrubo/filament-model-settings)[ GitHub Sponsors](https://github.com/Quadrubo)[ RSS](/packages/quadrubo-filament-model-settings/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (12)Used By (0)

Filament Model Settings Plugin
==============================

[](#filament-model-settings-plugin)

[![Latest Version on Packagist](https://camo.githubusercontent.com/984f58547bc092b8fb3ed116588248bc41faff5d6772107527f0617882a7cc00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f717561647275626f2f66696c616d656e742d6d6f64656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/quadrubo/filament-model-settings)[![GitHub Tests Action Status](https://camo.githubusercontent.com/445c89786ecbbf8c938f4a28bf9d788b1ce603b0deea169727496e7592652a84/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f717561647275626f2f66696c616d656e742d6d6f64656c2d73657474696e67732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/quadrubo/filament-model-settings/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/0e88cd6d2c7d62d9a9c2b401978d70d47ca9121052e902af786a26e2930ced04/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f717561647275626f2f66696c616d656e742d6d6f64656c2d73657474696e67732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/quadrubo/filament-model-settings/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/9951332df4d3df17ac8c7839e55622d298d9d2ff346cb2b8e9cf666f918c4024/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f717561647275626f2f66696c616d656e742d6d6f64656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/quadrubo/filament-model-settings)

This package utilizes [glorand/laravel-model-settings](https://github.com/glorand/laravel-model-settings) to incorporate model-specific settings into Filament. For instance, you can implement individualized settings for each user in your Filament application.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require quadrubo/filament-model-settings
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-model-settings-views"
```

Usage
-----

[](#usage)

You should start by setting up your eloquent model.
**Important:** You should read the [Instructions](https://github.com/glorand/laravel-model-settings#update_models) of the `glorand/laravel-model-settings` to find out how to do this.

### Seperate Settings Page

[](#seperate-settings-page)

Then you can start by generating a settings page.

```
php artisan make:filament-model-settings-page ManagePreferences
```

In your new settings page class, generated in the `app/Filament/{Panel}/Pages` directory, you should fill the `getSettingsRecord()` function. For example, to make user specific settings, simply return the currently active user:

```
public static function getSettingRecord()
{
    return auth()->user();
}
```

You should also edit the `form()` function to create the fields for your settings. For example, if you have the setting `theme` you can do this:

```
public function form(Form $form): Form
{
    return $form
        ->schema([
            Forms\Components\Select::make('theme')
                ->options([
                    'dark' => 'Dark Mode',
                    'light' => 'Light Mode',
                    'high_contrast' => 'High Contrast',
                ]),
        ]);
}
```

#### Using the Page in the user menu

[](#using-the-page-in-the-user-menu)

If you want to use this page in filaments user menu, you can create an entry in your panel provider.

```
use App\Filament\Admin\Pages\ManagePreferences;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->
            ...
            ->userMenuItems([
                MenuItem::make()
                    ->label('Settings')
                    ->url(fn (): string => ManagePreferences::getUrl())
                    ->icon('heroicon-o-cog-6-tooth'),
            ]);
    }
}
```

You may also want to hide the page in the sidebar.

```
namespace App\Filament\Admin\Pages;

class ManagePreferences extends ModelSettingsPage implements HasModelSettings
{
    public static function shouldRegisterNavigation(): bool
    {
        return false;
    }
}
```

### Settings within your existing Resouce

[](#settings-within-your-existing-resouce)

The settings can also be used in your existing resource. If, for example you have a school model with the settings `color` and `can_add_students`.

```
namespace App\Models;

use Glorand\Model\Settings\Traits\HasSettingsField;

class School extends Model
{
    use HasSettingsField;

    public $defaultSettings = [
        'color' => '#ff0000',
        'can_add_students' => true,
    ];
}
```

You can then use the provided macro `isModelSetting()` to use these settings inside your resource.

```
namespace App\Filament\Resources;

class SchoolResource extends Resource
{
    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\ColorPicker::make('settings.color_1')
                    ->isModelSetting(),
                Forms\Components\Toggle::make('settings.can_add_students')
                    ->isModelSetting(),
            ]);
    }
}
```

In case you changed your column name for the settings, you should provide that to `isModelSetting` as a prefix.

```
Forms\Components\Toggle::make('school_stuff.can_add_students')
    ->isModelSetting('school_stuff'),
```

Testing
-------

[](#testing)

```
composer test
```

Inspiration
-----------

[](#inspiration)

This package is heavily inspired by the official [Spatie Laravel Settings Plugin](https://github.com/filamentphp/spatie-laravel-settings-plugin) for filament and basically just implements a few changes to make it compatible with [glorand/laravel-model-settings](https://github.com/glorand/laravel-model-settings).

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Quadrubo](https://github.com/Quadrubo)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance79

Regular maintenance activity

Popularity40

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~88 days

Recently: every ~132 days

Total

10

Last Release

110d ago

Major Versions

v1.5.0 → v2.0.02026-01-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba196f48134b1195242931006b23881084411f9bee6f2e36389822479ffb3333?d=identicon)[Quadrubo](/maintainers/Quadrubo)

---

Top Contributors

[![Quadrubo](https://avatars.githubusercontent.com/u/71718414?v=4)](https://github.com/Quadrubo "Quadrubo (29 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![tiran133](https://avatars.githubusercontent.com/u/651050?v=4)](https://github.com/tiran133 "tiran133 (1 commits)")[![mariomka](https://avatars.githubusercontent.com/u/1822472?v=4)](https://github.com/mariomka "mariomka (1 commits)")[![belzaaron](https://avatars.githubusercontent.com/u/21190036?v=4)](https://github.com/belzaaron "belzaaron (1 commits)")[![telkins](https://avatars.githubusercontent.com/u/53731?v=4)](https://github.com/telkins "telkins (1 commits)")

---

Tags

laravelQuadrubofilament-model-settings

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/quadrubo-filament-model-settings/health.svg)

```
[![Health](https://phpackages.com/badges/quadrubo-filament-model-settings/health.svg)](https://phpackages.com/packages/quadrubo-filament-model-settings)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
