Download the PHP package arandu/laravel-site-options without Composer
On this page you can find all versions of the php package arandu/laravel-site-options. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-site-options
Laravel Site Options
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
Getting started is simple. Install the package via Composer:
Next, publish the configuration and migration files:
Run the migration to create the necessary database table:
💡 Usage
Laravel Site Options offers a fluent API that makes managing site options a breeze:
For more details, check out the advanced usage section.
🌟 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
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
asSITE_OPTIONS_CACHE_ENABLED
.key
: Set the cache key for storing options.ttl
: Define cache TTL in minutes, configurable via.env
asSITE_OPTIONS_CACHE_TTL
.
hard_defaults
: Specify hard-coded default values for options. If you specify a default value when callingOption::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
Refer to the table below to match your Laravel version with the appropriate Laravel Site Options version:
Laravel Framework | Laravel Site Options |
---|---|
8.x | 1.x |
9.x | 2.x |
10.x | 3.x |
11.x | 4.x |
🛠️ Testing
🚨 Issues
Encounter a problem? Report it on our GitHub issue tracker.
🔒 Security
For security-related concerns, please refer to SECURITY.md.
🤝 Contributing
We welcome contributions from the community! Please read CONTRIBUTING.md to get started.
📜 License
This project is open-sourced under the MIT License. See the LICENSE file for more details.