Package Data | |
---|---|
Maintainer Username: | dannehl |
Maintainer Contact: | dev@dannehl.net (D. Dannehl) |
Package Create Date: | 2015-08-28 |
Package Last Update: | 2015-08-28 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:00:38 |
Package Statistics | |
---|---|
Total Downloads: | 26 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
##Installation
Add "dannehl/user-settings"
to composer.
Add the service provider:
Dannehl\UserSettings\UserSettingsServiceProvider::class,
Add the Facade:
'UserSettings' => Dannehl\UserSettings\Facade\UserSettings::class,
###Storage The settings are stored as key value pairs in a file for each user. Make sure the folder /storage/userconf exists. Filenames are generated from the user id, so this will only work for authenticated users. The user id is taken from Auth::user()->id;
##Usage
// Store a value
\UserSettings::set('My_Name','John');
// Get a value
echo \UserSettings::get('My_Name'); // -> John