DarkGhostHunter / Laraconfig

Per-user settings repository system for Laravel
MIT License
173 stars 49 forks source link

Initialise when loading historic user records #18

Closed mralston closed 3 years ago

mralston commented 3 years ago

Corrected code sample in documentation.

Changed:

$user->config()->initialize();

to:

$user->settings()->initialize();
mralston commented 3 years ago

Added handler to Eloquent retrieved event within HasConfig trait, so that the settings bag is initialised when a user record is retrieved from the database which was created before adoption of Laraconfig.