azaharizaman / nexus-laravel-setting-adapter
Laravel adapter for Setting package with configuration management
Package info
github.com/azaharizaman/nexus-laravel-setting-adapter
pkg:composer/azaharizaman/nexus-laravel-setting-adapter
Requires
- php: ^8.3
- azaharizaman/nexus-setting: dev-main
- illuminate/database: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
- psr/log: ^3.0
Requires (Dev)
- mockery/mockery: ^1.6
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-05-05 03:44:57 UTC
README
This adapter provides Laravel-specific implementations for the Setting package, enabling configuration management in Laravel applications.
Purpose
The Setting package is an atomic package that must remain independently publishable. This adapter layer provides the concrete implementations that integrate Setting with the Laravel framework:
- Cache integration - Uses Laravel's cache system
- Authorization integration - Provides SettingsAuthorizerAdapter for integrating with Laravel's authorization system
Installation
composer require azaharizaman/nexus-laravel-setting-adapter
Adapters Provided
SettingRepositoryAdapter
Implements Nexus\Setting\Contracts\SettingRepositoryInterface using cache-only storage.
TODO: Database persistence is not yet implemented. Currently delegates to SettingsCacheAdapter.
SettingsCacheAdapter
Implements Nexus\Setting\Contracts\SettingsCacheInterface by using Laravel's cache system.
SettingsAuthorizerAdapter
Implements Nexus\Setting\Contracts\SettingsAuthorizerInterface by using Laravel's authorization system.
Service Provider
The SettingAdapterServiceProvider automatically binds the Setting interfaces to their adapter implementations when the Laravel application boots.
Architecture
This follows the Nexus Three-Layer Architecture:
- Atomic Layer (
packages/Setting) - Pure business logic, no external dependencies - Adapter Layer (
adapters/Laravel/Setting) - Framework-specific implementations - Application Layer - Uses adapters through interfaces
Dependencies
azaharizaman/nexus-setting- The atomic Setting packageilluminate/support- Laravel framework componentsilluminate/database- Laravel database componentspsr/log- PSR-3 logging interface