PHPackages                             salehye/laravel-settings - 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. [Admin Panels](/categories/admin)
4. /
5. salehye/laravel-settings

ActiveLibrary[Admin Panels](/categories/admin)

salehye/laravel-settings
========================

باكج احترافي متكامل لإدارة إعدادات المواقع في لارافل مع دعم الترجمة والتخزين المؤقت

v1.1.0(1mo ago)01↓100%MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since Mar 15Pushed 1mo agoCompare

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

READMEChangelogDependencies (9)Versions (4)Used By (0)

Salehye\\LaravelSettings Laravel Package
========================================

[](#salehyelaravelsettings-laravel-package)

[![Laravel](https://camo.githubusercontent.com/5a580364ff3bd338370177402c5c050ff81a1933927e1e475c920c90850b38a3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/5a580364ff3bd338370177402c5c050ff81a1933927e1e475c920c90850b38a3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)[![PHP](https://camo.githubusercontent.com/d282cc3193faee11ee32307d0c4c9d809e8fafa4b3a8c12c6afbf35d4f7ec617/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/d282cc3193faee11ee32307d0c4c9d809e8fafa4b3a8c12c6afbf35d4f7ec617/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)[![MIT License](https://camo.githubusercontent.com/7a1226d14a365d288bfe51ece915ee0c7e754a16faa51ff06436504de29b33b4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/7a1226d14a365d288bfe51ece915ee0c7e754a16faa51ff06436504de29b33b4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e7376673f7374796c653d666f722d7468652d6261646765)

Salehye\\LaravelSettings is a comprehensive Laravel package designed for flexible, extensible, multi-language, and enterprise-ready management of website settings. It provides a robust architecture based on Domain-Driven Design (DDD) principles, ensuring maintainability and scalability for your Laravel applications.

Features
--------

[](#features)

- **Flexible**: Easily define and manage various types of settings (string, integer, boolean, array, JSON, float).
- **Extensible**: Designed with interfaces and services, allowing for easy customization and extension of core functionalities like caching and validation.
- **Multi-language Support**: Built-in support for translating setting descriptions and values.
- **Enterprise-ready**: Follows best practices for Laravel package development, including migrations, configuration, commands, and API endpoints.
- **Caching**: Integrated caching mechanism to optimize performance for frequently accessed settings.
- **Validation**: Custom validation rules can be defined for settings.
- **Artisan Commands**: Convenient Artisan commands for installation and management.
- **API Endpoints**: RESTful API for programmatic access and management of settings.
- **Facade &amp; Helper**: Easy access to settings via a Facade and a global helper function.

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

[](#installation)

You can install the package via Composer:

```
composer require your-vendor/web-settings
```

After installing the package, you can publish its configuration and run the migrations using the `web-settings:install` Artisan command:

```
php artisan web-settings:install
```

This command will:

- Publish the `web-settings.php` configuration file to your `config` directory.
- Publish the migration file to your `database/migrations` directory.
- Run the migrations to create the `web_settings` table.

Alternatively, you can publish the files manually:

```
php artisan vendor:publish --provider="Salehye\LaravelSettings\Providers\Salehye\LaravelSettingsServiceProvider" --tag="web-settings-config"
php artisan vendor:publish --provider="Salehye\LaravelSettings\Providers\Salehye\LaravelSettingsServiceProvider" --tag="web-settings-migrations"
php artisan migrate
```

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

[](#configuration)

The `config/web-settings.php` file allows you to customize various aspects of the package:

```
// config/web-settings.php
return [
    'table_name' => 'web_settings',
    'cache' => [
        'enabled' => env('WEB_SETTINGS_CACHE_ENABLED', true),
        'duration' => env('WEB_SETTINGS_CACHE_DURATION', 60),
        'prefix' => env('WEB_SETTINGS_CACHE_PREFIX', 'web_settings_'),
    ],
    'validation' => [
        'rules' => [
            // 'app_name' => 'required|string|max:255',
        ],
    ],
    'defaults' => [
        // ['key' => 'app_name', 'value' => 'My Laravel App', 'type' => 'string', 'group' => 'general', 'description' => 'The name of the application'],
    ],
    'web_middleware' => ['web', 'auth'],
    'api_middleware' => ['api', 'auth:sanctum'],
    'localization' => [
        'enabled' => env('WEB_SETTINGS_LOCALIZATION_ENABLED', false),
        'locales' => ['en', 'ar'],
        'default_locale' => 'en',
    ],
];
```

Usage
-----

[](#usage)

### Getting Settings

[](#getting-settings)

You can retrieve settings using the `Settings` Facade or the `web_setting()` helper function:

```
// Using the Facade
use Salehye\LaravelSettings\Support\Facades\Settings;

$appName = Settings::get('app_name', 'Default App Name');

// Using the helper function
$contactEmail = web_setting('contact_email', 'info@example.com');

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

### Setting/Updating Settings

[](#settingupdating-settings)

```
// Using the Facade
Settings::set('app_name', 'My New App Name', 'string', 'general', 'Updated application name');

// Using the helper function (if you need to set, call without arguments first)
web_setting()->set('contact_email', 'new_info@example.com', 'email', 'contact');
```

### Deleting Settings

[](#deleting-settings)

```
Settings::forget('old_setting_key');
```

### API Endpoints

[](#api-endpoints)

The package provides the following API endpoints (prefixed with `/api/web-settings`):

MethodURIActionMiddleware`GET``/``index``api`, `auth:sanctum``GET``/{key}``show``api`, `auth:sanctum``PUT``/{key}``update``api`, `auth:sanctum``DELETE``/{key}``destroy``api`, `auth:sanctum`Example API usage with `PUT` request:

```
curl -X PUT \
  http://your-app.com/api/web-settings/app_name \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer YOUR_SANCTUM_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "value": "My Updated App",
    "type": "string",
    "group": "general",
    "description": "The updated name of the application"
  }'
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

License
-------

[](#license)

The Salehye\\LaravelSettings Laravel Package is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance88

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Every ~0 days

Total

3

Last Release

58d ago

PHP version history (3 changes)v1.0.0PHP ^8.2

v1.0.1PHP ^8.1|^8.2|^8.3

v1.1.0PHP ^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ebed43102dcdc037e65b6e6548f3dcc1aec28e1681913e6415c0f1c4cc0fd34?d=identicon)[salehye](/maintainers/salehye)

---

Top Contributors

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

---

Tags

laravelconfigurationSettingspackageadminmulti-languagelaravel-settingsweb-settingssalehye

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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