dominservice/laravel-config

Merge default config with dynamic settings, and optimize.

1.1.10 2024-11-10 13:53 UTC

This package is auto-updated.

Last update: 2024-12-10 14:00:06 UTC


README

Packagist Latest Version Total Downloads Software License

Laravel Config Optimize for laravel 10+ on PHP 8.1+

Installation

composer require dominservice/laravel-config

Add the service provider to config/app.php

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

You should publish the migration and the config/optimize.php config file with:

php artisan vendor:publish --provider="Dominservice\LaravelConfig\ServiceProvider"

Usage

From SHELL

php artisan dso:optimize-config

From PHP

use Dominservice\LaravelConfig\Config;

// ...

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