Download the PHP package rayhan2001/laravel-settings-manager without Composer
On this page you can find all versions of the php package rayhan2001/laravel-settings-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rayhan2001/laravel-settings-manager
More information about rayhan2001/laravel-settings-manager
Files in rayhan2001/laravel-settings-manager
Package laravel-settings-manager
Short Description A simple and reusable Laravel package for managing application settings (general, email, social, payment, etc).
License MIT
Informations about the package laravel-settings-manager
Laravel Settings Manager
A simple and reusable Laravel package for managing application settings (general, email, social, payment, etc).
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
Step 1: Add Package to Autoloader
Add the package to your main composer.json file's autoload section:
Then run:
Step 2: Register Service Provider
Add the service provider to your bootstrap/providers.php file:
Step 3: Publish Assets
Publish the package assets using one of the following commands:
Publish All Assets
Publish Only Config
Publish Only Migrations
Publish Only Views
Step 4: Run Migrations
Run the migrations to create the settings table:
Configuration
The configuration file is published to config/settings.php. You can customize the following options:
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.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
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
Using the Settings Facade
Using the Settings Helper
Using the Settings Service
Available Field Types
The package supports various field types for the built-in UI:
text: Text inputemail: Email inputurl: URL inputnumber: Number inputselect: Dropdown selectpassword: Password inputtextarea: Textarea
Customization
Adding New Sections
You can add new sections by modifying the sections array in config/settings.php:
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
- PHP 8.1 or higher
- Laravel 10.0 or higher
License
The MIT License (MIT). Please see License File for more information.