Skip to content

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

Notifications You must be signed in to change notification settings

hcivelek/laravel-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 hcivelek/laravel-settings

If you want to use different table name instead of settings

$ php artisan vendor:publish --provider="hcivelek\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)

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages