PHPackages                             farzai/laravel-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. farzai/laravel-model-settings

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

farzai/laravel-model-settings
=============================

Laravel model setting

1.0.0(2y ago)04[2 PRs](https://github.com/farzai/laravel-model-settings/pulls)MITPHPPHP ^8.0

Since May 22Pushed 2y agoCompare

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

READMEChangelog (1)Dependencies (13)Versions (4)Used By (0)

Laravel Model Setting
=====================

[](#laravel-model-setting)

[![Latest Version on Packagist](https://camo.githubusercontent.com/90ad46f99456e944229e2192137b1177b5e4b06734c3cc0dbf1c97ad40586607/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6661727a61692f6c61726176656c2d6d6f64656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/farzai/laravel-model-settings)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c2f5cc296571f5094c5de14bae60d6bc1e1a51b00f0d08d46f0ff9b3c66b2302/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6661727a61692f6c61726176656c2d6d6f64656c2d73657474696e67732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/farzai/laravel-model-settings/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/cf50bb5835e83ed3b3346fa32fa854ad756a603d51c86fe14fe62f941ebf1079/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6661727a61692f6c61726176656c2d6d6f64656c2d73657474696e67732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/farzai/laravel-model-settings/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/21fe55a885dfcb0ca7f51396a23179f3539f574e5780dfb6698ad588035c5e20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6661727a61692f6c61726176656c2d6d6f64656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/farzai/laravel-model-settings)

Welcome to Laravel Model Settings, a powerful PHP library that allows you to manage settings for your models. This package is a simple yet effective tool that helps you dynamically configure your models in a Laravel application.

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

[](#installation)

You can install the package via composer:

```
composer require farzai/laravel-model-settings
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="laravel-model-settings-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-model-settings-config"
```

This is the contents of the published config file:

```
// config/model-settings.php
return [
    'model' => \Farzai\ModelSettings\Model::class,
];
```

Usage
-----

[](#usage)

```
use Farzai\ModelSettings\Facades\Setting;
use App\Models\Post;

// Create a setting for a model
Setting::for(Post::class)->set('default-status', 'draft');

// Get a setting for a model
Setting::for(Post::class)->get('default-status');

// Get a setting for a model or return a default value
Setting::for(Post::class)->get('default-status', 'published');
```

Or you can use without model

```
use Farzai\ModelSettings\Facades\Setting;

// Create a setting
Setting::set('default-status', 'draft');

// Get a setting
Setting::get('default-status');
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

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

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

1092d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4928451?v=4)[parsilver](/maintainers/parsilver)[@parsilver](https://github.com/parsilver)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![parsilver](https://avatars.githubusercontent.com/u/4928451?v=4)](https://github.com/parsilver "parsilver (3 commits)")

---

Tags

laravellaravel-model-settingsfarzai

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/farzai-laravel-model-settings/health.svg)

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[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)
