Download the PHP package robtrehy/laravel-application-settings without Composer

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

Laravel Application Settings

This is a package for Laravel that can be used to store and access settings for your application. The settings are stored in a single database table. The default configuration stores this in a settings table.

Installation

  1. Run composer require robtrehy/laravel-application-settings to include this in your project.
  2. Publish the config file with the following command

  3. Modify the published configuration file to your requirements. The file is located at config/application-settings.php.
  4. Add the settings table to the database. A migration file is included, just run the following command

    This will add the table defined in your configuration file to your database.

Configuration

Open config/application-settings.php to adjust the packages configuration.

If this file doesn't exist, run php artisan vendor:public --provider="RobTrehy\LaravelApplicationSettings\ApplicationSettingsServiceProvider" --tag="config" to create the default configuration file.

Set table, key, and value to match your requirements.

Laravel Application Settings uses the Laravel Cache driver to reduce the number of queries on your database. By default Laravel Caches using the file driver. If you wish to disable this, you can use the null driver. The cache key supplied by Laravel Application Settings can be set by changing the cache.key configuration value.

Example configuration

Usage

Set a Setting

Use this method to set a setting for the application

The setting will be immediately saved to the database

Get a Setting

Use this method to get the value of a setting for the application Pass a second arguement to return a default value if the setting is not set, defaults to null

Get multiple Settings

Use this method to get the value of multiple settings for the application Pass a second arguement to return a default value if the setting is not set, defaults to null

Get all Setting

Use this method to get all of the applications's settings as an array

Check if an Application Setting is set

To check if the application has a specific setting set, you can call

This will return true if a value was found, false if not.

Save a Setting

All settings are saved automatically when ApplicationSettings::set(); is called.

Delete a Setting

To delete a setting, you can call

There will be no return from this call.

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.

License

This Laravel package is free software distributed under the terms of the MIT license. See LICENSE


All versions of laravel-application-settings with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^9.2|^10.0|^11.0
orchestra/testbench Version ^7.0|^8.0|^9.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 robtrehy/laravel-application-settings contains the following files

Loading the files please wait ....