Download the PHP package cryental/laravel-dynamic-config without Composer

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

Larvel Dynamic Config

Introduction

This Package makes it possible for users to have their config files stored in a database table, making it easier to customize these values from UI.

Installation

You can install the package via composer:

The package will automatically register itself.

You can publish the config with:

Config file:

Migration:

Usage

First of all, you need to decide which config file(s) you want them to be stored in database by adding 'dynamic'=> true to the file, as simple as that:

  • Note that dynamic indicator is defined in /config/emadha/dynamic-conf.php:
  • You can add dynamic=>true to any config file to store it in database and fetch the values from there instead of using the actual config file
  • The values defaults will be taken from the actual config file.
  • You can have more than one config file loaded dynamically
  • dynamic=>true can only be added in the first dimension of that config array.

The main config file of this packages is located in /config/emadha/dynamic-conf.php and contains the following code:

The content of that file is pretty clear and well documented.

Usage

As simple as that.

Why is that Useful?

In case you ever wanted to control the site title from a UI (backend, frontend), in a dynamic way without having to edit the actual config file, then this a good approach.

Another Example: Let's say you have a google analytics code a long with some other customizations, and you have these in /config/site.php as follows:

This config file cannot be easily modified from a user interface, thus your clients will not be able to edit this without editing the actual file, In that case this package will prove to be useful, adding the key dynamic=>true to that config file will make it store it's values in database using the same format as Laravel, therefore it will be no different for you to get the value of some key in that config file, example config('site.google.UA), plus adding some nice features like updating the value and revert back to default.

With that approach you can now create a backend input to customize these, using one line of code config('site.google.UA')->setTo('XYZ'); and then use it in your blade like normal:


All versions of laravel-dynamic-config with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version ^7.0|^8.0|^9.0|^10.0|^11.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 cryental/laravel-dynamic-config contains the following files

Loading the files please wait ....