Download the PHP package core45/system-settings-db without Composer
On this page you can find all versions of the php package core45/system-settings-db. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download core45/system-settings-db
More information about core45/system-settings-db
Files in core45/system-settings-db
Package system-settings-db
Short Description Get system settings for your Laravel app from database
License MIT
Informations about the package system-settings-db
system-settings-db
Very simple package for storing settings for your Laravel project in the database.
Requirements
- PHP 8.3+
- Laravel 12 or 13
Installation
Install the package with composer:
Publish the package files:
Or publish only one part:
Migrate the database:
Usage
After migrating the new table system_settings will be created in the database. The package doesn't provide a UI for managing the settings. You have to add/modify/delete the records on your own. The important columns are:
- key: the key of the setting
- value: the value of the setting
The other columns are for your convenience. You can also add your own columns to the table if you like.
Setting a value
In the database you can set a value for a key. The key is a string and the value can be a string, integer or boolean.
To access the value of a key you can use the config() helper function.
So for example in your blade template you can use your contact email you previously stored in the settings table:
Cache
The package uses the Laravel cache so if you'd like to see the changes immediately clean the Laravel cache. Default TTL of the cache is 60 seconds. You can change this setting in the config file.
License
MIT
All versions of system-settings-db with dependencies
illuminate/support Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0