Download the PHP package dominservice/laravel-config without Composer

On this page you can find all versions of the php package dominservice/laravel-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-config

Laravel Config Optimize

[Packagist]() Latest Version Total Downloads

Merge default config with dynamic DB settings, include custom config files, and cache the result. Laravel 10-13 on PHP 8.1+.

Features

Installation

Current compatibility targets:

Laravel package discovery is enabled. Manual registration is only needed if you disabled discovery:

Publish assets (config + migration):

Run migrations:

Usage

From shell:

From PHP:

Runtime refresh after buildCache()

After buildCache() the package immediately reloads the freshly written cached config file into the current Laravel runtime. This is meant for flows where settings are saved from an admin panel and the same request should already render with updated config() values.

The refresh works in three steps:

This matches Laravel's configuration bootstrap more closely than mutating the existing repository with app('config')->set([...]), which can leave mixed old/new runtime state in the same request.

Database-backed config values

The settings table stores only the values that differ from defaults. Types are auto-cast based on the default config value. If a value equals the default, the DB record is removed.

Middleware (build cache on first request)

The middleware runs only for GET requests, skips JSON and Livewire requests, and redirects once after building the cache. In production it also runs route:cache.

Custom config files

Use config/optimize.php to merge non-standard config files (for module systems, etc). Each key becomes the config namespace; values can be a string path or an array of paths.

The package merges these arrays recursively using Arr::recursiveMerge.

optimize_config helper (replace env())

optimize_config() reads from optimize_config.php in the project root and falls back to Env::get. It supports ${VAR} interpolation inside values.

Example in config/app.php:

Auto-generate optimize_config.php

When you run vendor:publish, the service provider will:

Review this behavior before running vendor:publish in production.


Support

Support this project (Ko-fi)

If this package saves you time, consider buying me a coffee: https://ko-fi.com/dominservice - thank you!


License

MIT (c) Dominservice


All versions of laravel-config with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
laravel/framework Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dominservice/laravel-config contains the following files

Loading the files please wait ...