PHP code example of orumad / lumen-config-cache

1. Go to this page and download the library: Download orumad/lumen-config-cache 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/ */

    

orumad / lumen-config-cache example snippets


$app->register(Orumad\ConfigCache\ServiceProviders\ConfigCacheServiceProvider::class);

return [

    /**
     * The name of the key where the config is stored in cache
     */
    'cache_key' => 'config_cache',

    /**
     * Expiration time for the config in cache
     */
    'cache_expiration_time' => 60*24, // One day

    /**
     * The config files (app, database, queue, etc.) to be cached
     * Add to this array whatever config files you want to load in cache
     */
    'config_files' => [
        'app',
    ],

];
bash
php artisan vendor:publish --tag="lumen-config-cache"
 php
// $app->withFacades();
 bash
php artisan lumen-config:cache