Package Data | |
---|---|
Maintainer Username: | webmachine |
Maintainer Contact: | contacto@webmachine.cl (WebMachine) |
Package Create Date: | 2017-03-16 |
Package Last Update: | 2022-03-10 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-14 15:08:40 |
Package Statistics | |
---|---|
Total Downloads: | 287 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
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"
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')
The MIT License (MIT). Please see License File for more information.