Download the PHP package alizharb/laravel-modular-livewire without Composer
On this page you can find all versions of the php package alizharb/laravel-modular-livewire. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alizharb/laravel-modular-livewire
More information about alizharb/laravel-modular-livewire
Files in alizharb/laravel-modular-livewire
Package laravel-modular-livewire
Short Description The official Livewire bridge for Laravel Modular offering automatic discovery and registration of modular Livewire components.
License MIT
Informations about the package laravel-modular-livewire
Laravel Modular Livewire ⚡
Laravel Modular Livewire is the official bridge for Laravel Modular. It enables automatic discovery, registration, and first-class Artisan support for Livewire components within your modular architecture.
✨ Features
- 🔍 Automatic Discovery: Automatically scans and registers Livewire components in
Modules/*/app/Livewire. - 🏗️ Modular Artisan Command: Enhanced
make:livewirecommand with--modulesupport. - 🎨 Namespace Isolation: Components are automatically prefixed with the module name (e.g.,
<livewire:blog::post-list />). - ⚡ Performance Optimized: Intelligent component caching for zero-overhead in production.
- 🩺 Diagnostics Ready: Designed for Laravel Modular 1.2
modular:doctor,modular:status,modular:debug, andmodular:test. - 🤖 Laravel Boost Support: Ships Boost guidance for module-owned Livewire components.
- ✅ Strictly Typed: Fully compatible with PHPStan level 5 (and scalable to level 9).
🚀 Installation
Install the package via Composer (requires alizharb/laravel-modular):
The service provider will be automatically registered. It will automatically hook into the laravel-modular registry.
📖 Usage
Generating Modular Components
Use the native make:livewire command with the --module flag to generate any Livewire 4 component type.
1. Single-File Components (Default)
The modern Livewire 4 standard. Everything in one .blade.php file.
- Creates:
Modules/Blog/resources/views/livewire/⚡status.blade.php - Identifier:
blog::status
2. Class-Based Components
The traditional separate Class and Template structure.
- Class:
Modules/Blog/app/Livewire/Analytics.php - View:
Modules/Blog/resources/views/livewire/analytics.blade.php
3. Multi-File Components (MFC)
Perfect for complex components with dedicated JS and CSS.
- Creates:
Modules/Blog/resources/views/livewire/⚡dashboard/(Directory containing.php,.blade.php,.js,.css)
4. Page Components (Preferred for Routing)
Use the pages:: prefix for full-page components to keep them logically separated from UI fragments.
- Creates:
Modules/Blog/resources/views/livewire/pages/⚡create.blade.php - Identifier:
blog::pages::post.create
Routing (Livewire 4)
Laravel Modular Livewire fully supports Livewire 4's native Route::livewire() for full-page modular components.
Using Class-based Routes
Using Modular Aliases
Using Components in Blade
In your Blade views, use the module's alias as the namespace:
⚙️ Configuration
The bridge respects your existing modular.php paths and Livewire's own configuration. No additional configuration is required.
Diagnostics
After changing module Livewire paths or manifests, run:
If alizharb/laravel-themer is installed, the make:livewire bridge also supports --theme=theme-slug for theme-scoped Livewire components.
📦 Related Packages
Explore the rest of the Laravel Modular ecosystem:
- Laravel Modular - The core modular system.
- Laravel Modular Filament - Filament integration for modular applications.
- Laravel Hooks - Event-driven hooks for modular communication.
- Laravel Themer - Theme management for modular applications.
🧪 Testing
🤝 Contributing
Please see CONTRIBUTING for details.
📄 License
The MIT License (MIT). Please see License File for more information.
Made with ❤️ by Ali Harb
All versions of laravel-modular-livewire with dependencies
alizharb/laravel-modular Version ^1.2
livewire/livewire Version ^4.0
spatie/laravel-package-tools Version ^1.16