Download the PHP package letsgoi/laravel-settings without Composer
On this page you can find all versions of the php package letsgoi/laravel-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package laravel-settings
Laravel Settings
Move your env variables to database to change them easily using laravel nova
Requirements
- PHP >= 8.3
- Laravel >= 10.0
- Laravel nova license registered on project
Installation
-
Require package with composer:
-
Add
Letsgoi\LaravelSettings\SettingsServiceProvider::class
toapp.php
`` -
Publish configuration:
- Add
SettingNovaResource::class
onNovaServiceProvider.php
``
Usage
This package use cache memory to save variables, instead of retrieving them from database each time you need to use it:
- When you save a variable, cache of this variable is cleared.
- First time you retrieve a variable it is saved to cache.
To register a new variable on Settings:
-
Create a migration with the name and key of the variable:
- The available types are: bool, string, float, array
- Run migrations:
php artisan migrate
- Access your nova url and fill the variable with the value: For booleans use 0 (false) and 1 (true).
- Use variable in your code using:
Testing
Run tests:
composer test
All versions of laravel-settings with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.3
illuminate/database Version ^10.0|^11.0
illuminate/http Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
illuminate/database Version ^10.0|^11.0
illuminate/http Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
The package letsgoi/laravel-settings contains the following files
Loading the files please wait ....