PHP code example of wilbur-yu / hyperf-options

1. Go to this page and download the library: Download wilbur-yu/hyperf-options 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/ */

    

wilbur-yu / hyperf-options example snippets



use WilburYu\HyperfOptions\OptionService;
// 使用全局函数
options()->set('key', 'value', 'desc'); // 创建或更新
options()->get('key');
options()->exists('key');
options()->remove('key');

// 使用服务类
$options = make(OptionService::class);
$options->set('key', 'value', 'desc');
$options->get('key');
$options->exists('key');
$options->remove('key');

composer n/hyperf.php vendor:publish wilbur-yu/hyperf-options
php ./bin/hyperf.php migarte