PHPackages                             arandu/laravel-site-options - 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. arandu/laravel-site-options

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

arandu/laravel-site-options
===========================

v4.0.0(1y ago)86.2k↓85.9%1PHPPHP ^8.2

Since Nov 13Pushed 1y ago2 watchersCompare

[ Source](https://github.com/AranduTech/laravel-site-options)[ Packagist](https://packagist.org/packages/arandu/laravel-site-options)[ RSS](/packages/arandu-laravel-site-options/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (13)Used By (0)

Laravel Site Options
====================

[](#laravel-site-options)

[![Tests](https://github.com/AranduTech/laravel-site-options/actions/workflows/tests.yml/badge.svg)](https://github.com/AranduTech/laravel-site-options/actions/workflows/tests.yml)

Laravel Site Options is a powerful yet easy-to-use package tailored for Laravel developers who need to manage global site settings effortlessly. Whether you're building a dynamic web application or a complex platform, this package provides a clean, intuitive interface to store and retrieve site-wide options with built-in caching for superior performance.

🚀 Installation
--------------

[](#-installation)

Getting started is simple. Install the package via Composer:

```
composer require arandu/laravel-site-options
```

Next, publish the configuration and migration files:

```
php artisan vendor:publish --provider="Arandu\LaravelSiteOptions\SiteOptionsServiceProvider"
```

Run the migration to create the necessary database table:

```
php artisan migrate
```

💡 Usage
-------

[](#-usage)

Laravel Site Options offers a fluent API that makes managing site options a breeze:

```
use Arandu\LaravelSiteOptions\Option;

// Store options
Option::set('welcome_message', 'Hello, World!');
Option::set('site_settings', ['theme' => 'dark', 'layout' => 'wide']);

// Retrieve options
echo Option::get('welcome_message');

$settings = Option::get('site_settings', [
    // ... the default settings
]);

// Check if an option exists
if (Option::has('maintenance_mode')) {
    // Perform action
}

// Remove options
Option::rm('outdated_option');
```

For more details, check out the [advanced usage section](.docs/advanced.md).

🌟 Features
----------

[](#-features)

- **Feature Toggles**: Easily manage feature flags for enabling or disabling features on the fly.
- **Global Site Settings**: Store and retrieve essential site settings like site name, logo, and more.
- **Dynamic Content**: Allow administrators to configure content such as footer phone numbers or popup delay times.
- **And more**: The possibilities are endless!

⚙️ Configuration
----------------

[](#️-configuration)

Customize the package settings in `config/site-options.php`:

- **`table`**: Define the database table name for storing options.
- **`cache`**: Fine-tune caching settings.
    - **`enabled`**: Toggle caching (true/false), configurable via `.env` as `SITE_OPTIONS_CACHE_ENABLED`.
    - **`key`**: Set the cache key for storing options.
    - **`ttl`**: Define cache TTL in minutes, configurable via `.env` as `SITE_OPTIONS_CACHE_TTL`.
- **`hard_defaults`**: Specify hard-coded default values for options. If you specify a default value when calling `Option::get()`, that value will take precedence.

Modify `config/site-options.php` to fit your needs, and for environment-specific configurations, use the `.env` file.

🔄 Version Compatibility
-----------------------

[](#-version-compatibility)

Refer to the table below to match your Laravel version with the appropriate Laravel Site Options version:

Laravel FrameworkLaravel Site Options8.x1.x9.x2.x10.x3.x11.x4.x🛠️ Testing
----------

[](#️-testing)

```
composer test
```

🚨 Issues
--------

[](#-issues)

Encounter a problem? Report it on our [GitHub issue tracker](https://github.com/AranduTech/laravel-site-options/issues).

🔒 Security
----------

[](#-security)

For security-related concerns, please refer to [SECURITY.md](SECURITY.md).

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions from the community! Please read [CONTRIBUTING.md](CONTRIBUTING.md) to get started.

📜 License
---------

[](#-license)

This project is open-sourced under the MIT License. See the [LICENSE](LICENSE.md) file for more details.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~29 days

Recently: every ~67 days

Total

11

Last Release

671d ago

Major Versions

v1.0.4 → v2.0.02023-11-22

v2.1.0 → 3.x-dev2024-08-30

v3.0.0 → v4.0.02024-09-01

PHP version history (5 changes)v1.0.0PHP ^7.3|^8.0

v1.0.2PHP ^7.4|^8.0

v2.0.0PHP ^8.0

3.x-devPHP ^8.1

v4.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/84a3afb785274d1c4712e7ed9fd924fe5dfd1f0c033e051f9d07d55df565920a?d=identicon)[obrunopolo](/maintainers/obrunopolo)

---

Top Contributors

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

---

Tags

laravellaravel-package

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arandu-laravel-site-options/health.svg)

```
[![Health](https://phpackages.com/badges/arandu-laravel-site-options/health.svg)](https://phpackages.com/packages/arandu-laravel-site-options)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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