1. Go to this page and download the library: Download lysice/hyperf-user-settings library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Set 'example' setting to 'hello world' and save to db
setting($userId)->set('example', 'hello world')->save();
// or use like:
$setting = setting($userId);
$setting->set('example', 'hello world')
$setting->save();
// Get the same setting
return setting($userId)->get('example');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.