webmachine / settings
Settings for Laravel 5
dev-master
2022-03-10 18:47 UTC
Requires
- php: >=5.5.0
- illuminate/database: >=5.4
- illuminate/support: >=5.4
This package is auto-updated.
Last update: 2026-04-11 04:17:40 UTC
README
Install
Via Composer
$ composer require webmachine/settings
Next, you must install the service provider and facade alias:
// config/app.php
'providers' => [
...
Webmachine\Settings\SettingsServiceProvider::class,
];
...
'aliases' => [
...
'Settings' => Webmachine\Settings\SettingsFacade::class,
];
Publish
$ php artisan vendor:publish --provider="Webmachine\Settings\SettingsServiceProvider"
Usage
In your models or controllers:
...
use Webmachine\Settings\SettingsFacade as Settings;
class Foo extends ... {
...
public function myfoo() {
$my_setting = Settings::get('mygroup.mysetting');
}
}
In your views
Settings::get('mygroup.mysetting')
License
The MIT License (MIT). Please see License File for more information.