PHPackages                             firdavs9512/laravel-setting - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. firdavs9512/laravel-setting

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

firdavs9512/laravel-setting
===========================

Laravel setting package

1.1.2(1y ago)3611[1 PRs](https://github.com/Firdavs9512/laravel-setting/pulls)MITPHP

Since Jul 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Firdavs9512/laravel-setting)[ Packagist](https://packagist.org/packages/firdavs9512/laravel-setting)[ RSS](/packages/firdavs9512-laravel-setting/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)DependenciesVersions (7)Used By (0)

Laravel Setting Package
=======================

[](#laravel-setting-package)

The `laravel-setting` package provides an easy way to manage application settings in a Laravel application. It includes helper functions and classes to get and set settings.

Installation
------------

[](#installation)

To install the package, you can use composer:

```
composer require firdavs9512/laravel-setting
```

### Publish Configuration and Migration

[](#publish-configuration-and-migration)

After installing the package, you need to publish the configuration file and migration.

```
php artisan vendor:publish --provider="Firdavs9512\LaravelSetting\LaravelSettingServiceProvider"
php artisan migrate
```

The first command publishes the configuration file to `config/laravel-setting.php` and the migration file for creating the settings table. The second command runs the migration to create the `laravel_settings` table.

Configuration
-------------

[](#configuration)

The package provides a configuration file located at `config/laravel-setting.php` where you can customize various settings.

Usage
-----

[](#usage)

### Setting and Getting Values

[](#setting-and-getting-values)

You can set and get settings using the `Firdavs9512\LaravelSetting\Setting` class. This class provides static methods `get` and `set`.

#### Setting a Value

[](#setting-a-value)

```
use Firdavs9512\LaravelSetting\Setting;

// Set a setting
Setting::set('site_name', 'My Awesome Site');
```

#### Getting a Value

[](#getting-a-value)

```
use Firdavs9512\LaravelSetting\Setting;

// Get a setting
$siteName = Setting::get('site_name', 'Default Site Name');
```

### Helper Function

[](#helper-function)

The package also provides a helper function `setting`. This function allows you to get and set settings conveniently.

#### Getting a Setting Value

[](#getting-a-setting-value)

To get a setting value, pass the key as the first argument and an optional default value as the second argument.

```
$siteName = setting('site_name', 'Default Site Name');
```

#### Setting a Value

[](#setting-a-value-1)

To set a setting value, you need to use the `SettingHelper` class returned when no key is passed to the `setting` function.

```
$settingHelper = setting();
$settingHelper->set('site_name', 'My Awesome Site');
```

### Example

[](#example)

Here is an example of how to use the package in a Laravel application:

```
// Set a setting
setting()->set('site_name', 'My Awesome Site');

// Get a setting
$siteName = setting('site_name', 'Default Site Name');
```

LaravelSettingServiceProvider
-----------------------------

[](#laravelsettingserviceprovider)

The `LaravelSettingServiceProvider` is responsible for bootstrapping the package's services. It publishes the configuration and migration files and merges the package configuration with the application's configuration.

Migration
---------

[](#migration)

The package includes a migration file that creates a `settings` table. This table is used to store the application settings.

To create the `settings` table, run the following command after publishing the migration file:

```
php artisan migrate
```

License
-------

[](#license)

This package is open-source and licensed under the [MIT license](LICENSE).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Total

6

Last Release

538d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3aada341e235f4a5fffae6c497686fcff8ee75db31b194169d4cf7ea6b6c94d?d=identicon)[Firdavs](/maintainers/Firdavs)

---

Top Contributors

[![Firdavs9512](https://avatars.githubusercontent.com/u/102187486?v=4)](https://github.com/Firdavs9512 "Firdavs9512 (17 commits)")[![Nobody9512](https://avatars.githubusercontent.com/u/89482141?v=4)](https://github.com/Nobody9512 "Nobody9512 (7 commits)")

### Embed Badge

![Health badge](/badges/firdavs9512-laravel-setting/health.svg)

```
[![Health](https://phpackages.com/badges/firdavs9512-laravel-setting/health.svg)](https://phpackages.com/packages/firdavs9512-laravel-setting)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
