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

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

pkalusek/laravel-model-settings
===============================

Simplest way to store model-specific settings/preferences in Laravel

1.0.1(9mo ago)010MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since Aug 9Pushed 9mo agoCompare

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

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Laravel Model Settings
======================

[](#laravel-model-settings)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8753b5c57cba53169e52d8e096e7732bb3ccd12deed26051a80e8720925da021/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706b616c7573656b2f6c61726176656c2d6d6f64656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pkalusek/laravel-model-settings)[![Total Downloads](https://camo.githubusercontent.com/000672e102809a45e0640371eed8b15194f5d8008e238931b5b46c89b7748abd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706b616c7573656b2f6c61726176656c2d6d6f64656c2d73657474696e67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pkalusek/laravel-model-settings)

The simplest way to store model-specific settings/preferences in Laravel. This package allows you to easily attach customizable settings to any Eloquent model.

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

[](#installation)

You can install the package via composer:

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

The package will automatically register itself via Laravel's package discovery.

Publish and run the migrations:

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

Usage
-----

[](#usage)

Add the `HasSettings` trait to any model you want to have settings:

```
