codeminos / laravel-settings
A simple settings management system for Laravel.
v1.0.2
2025-03-26 18:25 UTC
Requires
- php: >=8.2
- illuminate/support: ^9.0|^10.0|^11.0|^12.0
README
A simple and flexible settings manager for Laravel applications, allowing you to store and retrieve application settings easily.
๐ฆ Installation
You can install the package via Composer:
composer require codeminos/laravel-settings
Publish Configuration & Migrations
After installation, publish the config file and migration:
php artisan vendor:publish --provider="Codeminos\\Settings\\SettingsServiceProvider"
Then, run the migration:
php artisan migrate
โก Usage
Store a Setting
Settings::set('site_name', 'Codeminos');
Retrieve a Setting
$siteName = Settings::get('site_name');
Check if a Setting Exists
if (Settings::has('site_name')) {
// Do something
}
Delete a Setting
Settings::forget('site_name');
๐ Configuration
The package configuration file config/settings.php allows you to define default settings and behavior.
๐งช Testing
To run the package tests, use:
composer test
๐ License
This package is open-source and licensed under the MIT License.