Download the PHP package takethelead/laravel-settings without Composer

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

Laravel settings

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Overwrite config settings with values from the database.

Installation

You can install the package via composer:

In order to use this package you will need to publish its configuration file:

And migrate the database

Usage

Overwriting values

This package allows you to define config values that should be overwritten with a value from the database. The keys of these config values can be defined in config/laravel-settings.php, where you can find a key overwrites.

How does this work?

Imagine the following config file

In order to overwrite the value for key2 you will have to create a new setting in the database. You can do this by running the following artisan command (or by creating a migration):

please note that string values will be stored encrypted

Now that we have created a new setting in the database we have to tell the application to overwrite it. You can do that in config/laravel-settings.php

That's it, whenever you run config('some-config-file.key2') you will get the value from the database instead of the fallback value from the config file.

Does this impact performance?

No it doesn't, we cache all settings. So whenever a setting has been overwritten once, we will cache its query result forever. Unless you change the value of the setting, then we will clear the cache and and we will need to query for that setting once again.

If you cache your configuration files using php artisan config:cache, the overwritten values will aslo be cached and no queries will be performed during a request.

Available artisan commands

Command Description
php artisan laravel-settings:list List all settings
php artisan laravel-settings:update {setting} Update a setting, or creates it if it does not exist

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-settings with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
ext-json Version *
illuminate/config Version ^10.0|^11.0
illuminate/database Version ^10.0|^11.0
illuminate/events Version ^10.0|^11.0
illuminate/validation Version ^10.0|^11.0
nesbot/carbon Version ^2.71
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 takethelead/laravel-settings contains the following files

Loading the files please wait ....