dannehl/user-settings

Simple file based user settings for laravel

0.1 2015-08-28 11:59 UTC

This package is auto-updated.

Last update: 2024-11-25 21:23:23 UTC


README

##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