PHPackages                             mschinis/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. mschinis/settings

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

mschinis/settings
=================

210PHP

Since Apr 9Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Settings
================

[](#laravel-settings)

Web-Application settings for Laravel. An easy way to use yet powerful way to store and retrieve settings in your database. Use Settings for storing things like website title or general variables that are used throughout your development, and want to make the modification of these values easy.

Couple it together with a backend page to add/modify/delete settings on the fly, and you have yourself the perfect settings page.

### Installation

[](#installation)

In your Laravel project's composer.json file, add `settings` as a dependency in the require object:

```
"mschinis/settings": "dev-master"
```

Use `composer update` for composer to update the dependencies and download the package.

Once installed, add the ServiceProvider to your provider array and the Setting alias to your aliases array within `app/config/app.php`:

```
'providers' => array(

    'Mschinis\Settings\SettingsServiceProvider'

)

'aliases' => array(

    'Setting' => 'Mschinis\Settings\Facades\Setting'

)
```

Setting up the database table is as easy as 1-2-3.

1. Publish the migration file to your migrations using `php artisan migrate:publish mschinis/settings`
2. Run the migration using `php artisan migrate`

Wait, no 3rd step? Yup. Tha-Tha-Tha-That's all folks! Enjoy using the settings package :)

### Usage

[](#usage)

The package only stores the settings at the database, but more setting stores like redis/json file will be added soon. The default table is `settings`. If you wish to modify the table name, you can do so by publishing the configuration file using `php artisan config:publish mschinis/settings` and changing the table in the published config file.

You can either access the setting store via its facade. A simple usage example is shown below.

```
