Download the PHP package hepplerdotnet/laravel-config-override without Composer

On this page you can find all versions of the php package hepplerdotnet/laravel-config-override. 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-override

Laravel Config Override

Store Laravel Configuration in Database and use it thru config() helper

Important

This Package uses Illuminate\Vendor\HepplerDotNet\Providers\ConfigurationProvider

Before you start yelling "Using Illuminate namespace is bad practice!".

You're right, but let's take a look at Illuminate\Foundation\Application::registerConfiguredProviders

  1. It creates a collection from your App config providers array
  2. Splits this array in 2 chunks [Everything that starts with Illuminate\, rest of it]
  3. Adds all the composer packages service providers in between

This package derived from one of my projects which had some requirements:

  1. Login against Active Directory (solved easily with https://ldaprecord.com/docs/laravel/v2/)
  2. Make the whole App configuration maintainable thru Webgui, including ldap configuration

All "regular" options to register a Service Provider failed at some point, either Auth facade failed or LDAP failed because config() had no access to the configuration from database at this point.

So using Illuminate namespace was the only working solution. Period.

Installation

Requires at least laravel/framework 8.37 because of anonymous migrations

Run composer require hepplerdotnet/laravel-config-override

Note

key => values from database will have precedence over config or .env file!

Groups will be merged with existing configuration

Usage

Let's say you would change the app locale

Now you can access it with config("app.locale")

Or a more complex example with nested groups

Now you can access it with config("mail.mailers.smtp.host")

The Models

Group

Property Description Values
name Name analog to config file e.g. app or mail String
root Group is root element true or false
active Configuration is active and should be loaded true or false

Entry

Property Description Values
key Configuration Key String
value Configuration Value String, Password, Integer, Boolean, Array
type Value type String, Password, Integer, Boolean, Array

Type Password will be stored encrypted in database!

Config

Config is not a real Eloquent Model, it's just a Class which builds the config from database


All versions of laravel-config-override with dependencies

PHP Build Version
Package Version
Requires php Version ~8.0
laravel/framework Version ~8.37
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 hepplerdotnet/laravel-config-override contains the following files

Loading the files please wait ....