Download the PHP package salehye/laravel-settings without Composer
On this page you can find all versions of the php package salehye/laravel-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download salehye/laravel-settings
More information about salehye/laravel-settings
Files in salehye/laravel-settings
Package laravel-settings
Short Description باكج احترافي متكامل لإدارة إعدادات المواقع في لارافل مع دعم الترجمة والتخزين المؤقت
License MIT
Homepage https://github.com/salehye/laravel-settings
Informations about the package laravel-settings
Salehye\LaravelSettings Laravel Package
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
- 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 & Helper: Easy access to settings via a Facade and a global helper function.
Installation
You can install the package via Composer:
After installing the package, you can publish its configuration and run the migrations using the web-settings:install Artisan command:
This command will:
- Publish the
web-settings.phpconfiguration file to yourconfigdirectory. - Publish the migration file to your
database/migrationsdirectory. - Run the migrations to create the
web_settingstable.
Alternatively, you can publish the files manually:
Configuration
The config/web-settings.php file allows you to customize various aspects of the package:
Usage
Getting Settings
You can retrieve settings using the Settings Facade or the web_setting() helper function:
Setting/Updating Settings
Deleting Settings
API Endpoints
The package provides the following API endpoints (prefixed with /api/web-settings):
| Method | URI | Action | Middleware |
|---|---|---|---|
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:
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
License
The Salehye\LaravelSettings Laravel Package is open-sourced software licensed under the MIT license.
All versions of laravel-settings with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0
illuminate/console Version ^9.0|^10.0|^11.0|^12.0
illuminate/cache Version ^9.0|^10.0|^11.0|^12.0
illuminate/validation Version ^9.0|^10.0|^11.0|^12.0