intelrx/sitesettings

Application global properties

2.0.0 2024-09-30 20:53 UTC

This package is auto-updated.

Last update: 2024-09-30 20:56:12 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();