intelrx / sitesettings
Application global properties
Installs: 3 053
Dependents: 5
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.3
This package is auto-updated.
Last update: 2024-11-30 21:21:24 UTC
README
This Laravel package provides a simple and efficient way to manage site settings. You can store, retrieve, update, and delete configuration settings on a application using the SiteConfig class.
Installation
To install the package, add it to your Laravel project using Composer:
composer require intelrx/sitesettings
Usage
Import the package in your class
use Intelrx\Sitesettings\SiteConfig; SiteConfig::store('phone', '1234567890'); SiteConfig::get('phone'); SiteConfig::update('phone', '18487'); SiteConfig::delete('phone'); SiteConfig::list()
usage in the blade
{{ SiteConfig::get('phone') }}
Storing Settings
To store a new site setting, use the store method:
SiteConfig::store('phone', '1234567890');
Retrieving Settings
To retrieve a stored site setting, use the get method:
$phone = SiteConfig::get('phone');
Updating Settings
To update an existing site setting, use the update method:
SiteConfig::update('phone', '18487');
Deleting Settings
To delete a site setting, use the delete method:
SiteConfig::delete('phone');
Listing all Setting
To list complete site settings use the list method:
SiteConfig::list();