PHPackages                             rayhan2001/laravel-settings-manager - 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. rayhan2001/laravel-settings-manager

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

rayhan2001/laravel-settings-manager
===================================

A simple and reusable Laravel package for managing application settings (general, email, social, payment, etc).

v0.0.1(8mo ago)01MITPHPPHP ^8.1

Since Aug 24Pushed 8mo agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Laravel Settings Manager
========================

[](#laravel-settings-manager)

A simple and reusable Laravel package for managing application settings (general, email, social, payment, etc).

Features
--------

[](#features)

- Easy to use settings management system
- Built-in UI for managing settings (optional)
- Caching for improved performance
- Configurable form sections and fields
- Support for various field types (text, email, url, select, password, etc)
- Ready-to-use migrations, config, and views

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

[](#installation)

### Step 1: Add Package to Autoloader

[](#step-1-add-package-to-autoloader)

Add the package to your main `composer.json` file's autoload section:

```
"autoload": {
    "psr-4": {
        "App\\": "app/",
        "Database\\Factories\\": "database/factories/",
        "Database\\Seeders\\": "database/seeders/",
        "Rayhan\\Settings\\": "laravel-settings-manager/src/"
    }
}
```

Then run:

```
composer dump-autoload
```

### Step 2: Register Service Provider

[](#step-2-register-service-provider)

Add the service provider to your `bootstrap/providers.php` file:

```
return [
    App\Providers\AppServiceProvider::class,
    Rayhan\Settings\SettingsServiceProvider::class, // Add this line
];
```

### Step 3: Publish Assets

[](#step-3-publish-assets)

Publish the package assets using one of the following commands:

#### Publish All Assets

[](#publish-all-assets)

```
php artisan vendor:publish --provider="Rayhan\Settings\SettingsServiceProvider"
```

#### Publish Only Config

[](#publish-only-config)

```
php artisan vendor:publish --provider="Rayhan\Settings\SettingsServiceProvider" --tag=config
```

#### Publish Only Migrations

[](#publish-only-migrations)

```
php artisan vendor:publish --provider="Rayhan\Settings\SettingsServiceProvider" --tag=migrations
```

#### Publish Only Views

[](#publish-only-views)

```
php artisan vendor:publish --provider="Rayhan\Settings\SettingsServiceProvider" --tag=views
```

### Step 4: Run Migrations

[](#step-4-run-migrations)

Run the migrations to create the settings table:

```
php artisan migrate
```

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

[](#configuration)

The configuration file is published to `config/settings.php`. You can customize the following options:

### UI Settings

[](#ui-settings)

- `ui.enabled`: Enable/disable the built-in UI (default: true)
- `ui.middleware`: Middleware for UI routes (default: \['web', 'auth'\])
- `ui.prefix`: Route prefix for UI (default: 'admin/settings')
- `ui.route_name_prefix`: Route name prefix (default: 'settings.')

### Cache Settings

[](#cache-settings)

- `cache.enabled`: Enable/disable caching (default: true)
- `cache.key`: Cache key (default: 'rayhan.settings.all')
- `cache.ttl`: Cache time-to-live in seconds (default: 3600)

### Form Sections

[](#form-sections)

The package comes with pre-configured form sections:

- General settings (site name, tagline, URL)
- Email settings (SMTP configuration)
- Social media links
- Payment gateway settings (Stripe, PayPal, SSLCommerz)

Usage
-----

[](#usage)

### Using the Settings Facade

[](#using-the-settings-facade)

```
// Get a setting value
$value = Settings::get('site_name');

// Set a setting value
Settings::set('site_name', 'My Awesome Site');

// Get all settings
$allSettings = Settings::all();

// Check if a setting exists
if (Settings::has('site_name')) {
    // Do something
}
```

### Using the Settings Helper

[](#using-the-settings-helper)

```
// Get a setting value
$value = settings('site_name');

// Set a setting value
settings(['site_name' => 'My Awesome Site']);

// Get all settings
$allSettings = settings();
```

### Using the Settings Service

[](#using-the-settings-service)

```
use Rayhan\Settings\Services\SettingsManager;

class YourController extends Controller
{
    public function index(SettingsManager $settings)
    {
        $siteName = $settings->get('site_name');
        // ...
    }
}
```

Available Field Types
---------------------

[](#available-field-types)

The package supports various field types for the built-in UI:

- `text`: Text input
- `email`: Email input
- `url`: URL input
- `number`: Number input
- `select`: Dropdown select
- `password`: Password input
- `textarea`: Textarea

Customization
-------------

[](#customization)

### Adding New Sections

[](#adding-new-sections)

You can add new sections by modifying the `sections` array in `config/settings.php`:

```
'sections' => [
    'general' => [
        // ...
    ],
    'custom' => [
        'title' => 'Custom Section',
        'icon' => 'bi-star',
        'fields' => [
            [
                'type' => 'text',
                'label' => 'Custom Field',
                'key' => 'custom_field',
                'placeholder' => 'Enter custom value',
                'rules' => 'nullable|string|max:255',
            ],
        ],
    ],
],
```

### Modifying UI Routes

[](#modifying-ui-routes)

You can disable the built-in UI by setting `ui.enabled` to `false` in the config file, or customize the middleware and route prefix as needed.

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 10.0 or higher

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance59

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

261d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/56b80903c2289f26edd3df58ca58394eade3400e1cb50606540ee6471d0e5083?d=identicon)[Rayhan Ali](/maintainers/Rayhan%20Ali)

---

Top Contributors

[![rayhanstack](https://avatars.githubusercontent.com/u/260064532?v=4)](https://github.com/rayhanstack "rayhanstack (1 commits)")

### Embed Badge

![Health badge](/badges/rayhan2001-laravel-settings-manager/health.svg)

```
[![Health](https://phpackages.com/badges/rayhan2001-laravel-settings-manager/health.svg)](https://phpackages.com/packages/rayhan2001-laravel-settings-manager)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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