Download the PHP package panicdevs/modules without Composer
On this page you can find all versions of the php package panicdevs/modules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package modules
PanicDevs Modules
Super light-weight Modular approach with no overhead for Laravel. This package provides a clean, performant way to organize your Laravel application into modular components with intelligent discovery, caching, and management capabilities.
Features
- ✨ Zero Configuration - Works out of the box with sensible defaults
- 🚀 High Performance - Intelligent caching with automatic invalidation
- 🔍 Auto Discovery - Automatically discovers modules from configured paths
- 📦 Multiple Module Types - Support for foundation, modules, plugins, themes, etc.
- 🎛️ Enable/Disable - Runtime enable/disable of modules
- 🌱 Database Seeders - Built-in seeder management for modules
- 🎨 Beautiful CLI - Interactive commands with Laravel Prompts
- 🔒 Protected Modules - Prevent critical modules from being disabled
- 📊 Module Information - Rich metadata and dependency management
Requirements
- PHP >= 8.2
- Laravel >= 10.0
Installation
Install via Composer:
The package will automatically register its service provider via Laravel's auto-discovery.
Configuration
Publish the configuration file (optional):
Module Paths Configuration
Configure where your modules are located in config/modules.php:
Caching Configuration
Enable or disable module manifest caching:
Module Structure
Each module must contain a module.json file in its root directory:
Module Configuration (module.json)
Configuration Fields
- id/name: Unique module identifier
- alias: Short name for CLI commands (defaults to lowercase name)
- title: Human-readable module title
- description: Module description
- version: Module version
- priority: Loading priority (higher loads first, default: 0)
- providers: Array of service provider classes to register
- files: Array of files to include (relative to module root)
- depends_on: Array of module dependencies
Module Status Management
Module enable/disable status is stored in modules_statuses.json in your project root:
Artisan Commands
The package provides several Artisan commands for module management:
List Modules
Enable Modules
Disable Modules
Database Seeders
Performance Commands
Usage in Code
Module Service
Inject the ModuleService to interact with modules in your code:
Available Methods
Performance
Caching
The package includes intelligent caching:
- Automatic: Module manifest is cached automatically when
modules.cacheistrue - Cache Location:
bootstrap/cache/modules.php - Auto-Invalidation: Cache is invalidated when
modules_statuses.jsonchanges - Production Ready: Optimized for production environments
Loading Optimization
- Lazy Loading: Modules are only loaded when needed
- Priority-Based: Modules load in priority order (highest first)
- PSR-4 Integration: Seamless autoloading integration
- Minimal Overhead: Less than 1ms overhead in production
Database Seeders
Module Seeder Structure
Each module can have its own database seeders:
Main Database Seeder
The main seeder (ModuleNameDatabaseSeeder.php) coordinates all module seeders:
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -am 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT).
Credits
- Armin Hooshmand - Lead Developer
- PanicDevs - Development Team
Support
- Issues: GitHub Issues
- Documentation: GitHub README
- Security: Security Advisories
Made with ❤️ by PanicDevs
All versions of modules with dependencies
laravel/framework Version >=10
wikimedia/composer-merge-plugin Version ^2.1