Download the PHP package vkovic/laravel-settings without Composer
On this page you can find all versions of the php package vkovic/laravel-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-settings
Laravel Settings
Persist application settings in database easily
If you want to save application specific settings and you don't want to create another table/model/logic, this package is for you.
Compatibility
The package is compatible with Laravel versions >= 5.5
Installation
Install the package via composer:
Run migrations to create table which will be used to store our settings:
Usage
Let's create and retrieve some settings:
Multiple records could be retrieved using query
method and wildcard *
:
Beside string, settings can also be stored as integer, float, null, boolean or array:
We can easily check if settings exists without actually retrieving it from our table:
Counting all settings records is also a breeze:
If we need all settings, or just keys, no problem:
Also, we can remove settings easily:
If, for some reason, we want to delete all settings at once, no problem:
Contributing
If you plan to modify this Laravel package you should run tests that comes with it.
Easiest way to accomplish this would be with Docker
, docker-compose
and phpunit
.
First, we need to initialize Docker containers:
After that, we can run tests and watch the output:
All versions of laravel-settings with dependencies
laravel/framework Version 5.5.*|5.6.*|5.7.*
vkovic/laravel-meta Version ^0.2