• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Settings Management Library

#1
Hi all! I'd like to share my final CodeIgniter 3 library, fully rewritten for CI4 and ready to use. As with all my libraries, it's "configuration lite" so read the docs at GitHub, plug it in, and go.

Tatter/Settings - plug-and-play settings management for CodeIgniter 4

Basic usage:
1. Install with Composer: `> composer require tatter/settings`

2. Update the database: `> php spark migrate:latest -all`
3. Add settings: `> php spark settings:add timezone user America/New_York`
4. Load the service: `$settings = service('settings');`
5. Get/set settings per user:
PHP Code:
$settings->timezone $_POST['timezone_preference'];
...
$userTimezone $settings->timezone

Once the library is included all the resources are ready to go and you are ready to start adding settings. You may import setting templates directly into the `settings` table or add them manually with the provided CLI command: `> php spark settings:add`

Settings take one of three scopes: session, user, global.
  • Global settings are the same for every user and provide a dynamic way to set application-wide values
  • User settings start with a default template value but each user may make their own default that persists across sessions
  • Session settings start with a default template value and may be changed by a user but revert for each new session

In addition to the five libraries I have ported (and the original 'Audits') I have two CI3 libraries I never completed: 'Notices' (a user communication gateway) and 'Plots' (a sitemap generator and route analyzer). Please let me know if you'd find interest in these for CI4.
As always I am eager for feedback, suggestions, and contributions - feel free to respond here or on GitHub (https://github.com/tattersoftware/codeigniter4-settings). Thanks for reading!

Thanks for reading!
Reply


Messages In This Thread
Settings Management Library - by MGatner - 04-08-2019, 12:00 PM
RE: Settings Management Library - by albertleao - 04-08-2019, 02:02 PM
RE: Settings Management Library - by MGatner - 04-08-2019, 02:41 PM
RE: Settings Management Library - by albertleao - 04-08-2019, 03:52 PM
RE: Settings Management Library - by MGatner - 04-08-2019, 04:42 PM
RE: Settings Management Library - by albertleao - 04-13-2019, 09:49 PM
RE: Settings Management Library - by MGatner - 04-14-2019, 05:46 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.