PHP code example of dominservice / laravel-config

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

    

dominservice / laravel-config example snippets


'providers' => [
    // ...
    
    Dominservice\LaravelConfig\ServiceProvider::class,
],


use Dominservice\LaravelConfig\Config;

// ...

(new Config())->buildCache();

Dominservice\LaravelConfig\Http\Middleware\Optimize::class

config/app.php
...
     'env' => optimize_config('APP_ENV', 'production'),
...
shell
php artisan vendor:publish --provider="Dominservice\LaravelConfig\ServiceProvider"
shell
php artisan dso:optimize-config