ubitcorp/laravel-settings

It provides a settings model that can be used with trait on any model for Laravel project

Installs: 54

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 3

Forks: 0

Open Issues: 0

pkg:composer/ubitcorp/laravel-settings

v1.2 2020-01-09 15:49 UTC

This package is not auto-updated.

Last update: 2025-10-10 18:47:07 UTC


README

Latest Stable Version Total Downloads License Monthly Downloads Daily Downloads

Laravel Settings

It provides a settings model that can be used with trait on any model for Laravel project

Installation

Via Composer

$ composer require ubitcorp/laravel-settings

If you want to use different table name instead of settings

$ php artisan vendor:publish --provider="ubitcorp\Settings\ServiceProvider" 

Then you can change config/settings.php configuration file for table name. Then you should run:

$ php artisan migrate

Usage

This package provides the hasSettings trait that can be included any model. After that the functions below can be used:

settings()
addSetting($keyword, $value)
addSettings($settings)
removeSetting($keyword)
removeSettings($keywords)
syncSettings($settings)
valueofSetting($keyword)
valueOfSettingAsArray($keyword)