- What Laravel versions does this package support, and how does it handle PHP requirements?
- This package supports Laravel 12 and 13 with PHP 8.2+. It enforces these versions via Composer constraints, so ensure your project matches these requirements. The package auto-installs dependencies like Livewire 4.1+, Flux 2.13.1+, and Fortify 1.34, which are all compatible with these Laravel versions.
- How do I install and set up the package in an existing Laravel project?
- Run `composer require vormiaphp/ui-livewireflux-admin`, then execute the package’s installation command (check the latest docs for the exact artisan command). The package publishes migrations, views, and config files, so ensure your database is backed up before running migrations. It also integrates with Flux for sidebar injection, so Flux must be installed and configured first.
- Does this package work with non-Vormia Laravel apps, or is it tightly coupled to Vormia’s ecosystem?
- The package is designed for Vormia 5.4+ apps and relies on Vormia’s Role model for role-based access control. While you can use the UI components standalone, features like role assignment and some admin workflows assume Vormia’s models. For non-Vormia projects, you’d need to override or extend these dependencies manually, which may require significant customization.
- How does the package handle authentication? Can I use it with Sanctum or Breeze instead of Fortify?
- The package mandates Laravel Fortify for authentication, including features like `EnsureUserIsActive` and `PasswordValidationRules`. If your app uses Sanctum, Breeze, or Jetstream, you’ll face conflicts with Fortify’s migrations (e.g., `two_factor_*` columns). You can disable Fortify’s migrations or manually merge them, but this requires careful handling to avoid data loss or auth logic conflicts.
- Are the pre-built Livewire components customizable? How do I add custom fields or validation to the CRUD interfaces?
- The package provides modular Livewire components for categories, locations, and admin users, but customization docs are limited. You can extend components by creating child classes or overriding Blade templates in your project’s `resources/views/livewire/admin/` directory. For custom fields, modify the Volt templates or use Livewire’s `public properties` and `rules()` method in your component classes.
- What’s the performance impact of using Livewire 4 and Flux in a production admin panel?
- Livewire 4 (with Volt) improves performance over Blade by reducing template recompilation, but complex admin panels with nested CRUD forms or large datasets may still introduce latency. Flux’s sidebar injection is lightweight, but dynamic content loading can add overhead. Optimize by lazy-loading components, using pagination, and caching frequently accessed data via Laravel’s cache or Livewire’s `public cache` property.
- How does the package handle role assignment? Can I assign roles dynamically or only during user registration?
- The package supports role assignment during user registration via Fortify’s `CreateNewUser` callback. For dynamic role assignment, you’ll need to extend the `AdminUserController` or create a custom Livewire component. The package assumes Vormia’s Role model, so ensure your roles match Vormia’s schema (e.g., `name` field for role identification).
- Are there alternatives to this package for Laravel admin panels with Livewire?
- Yes. For Livewire-based admin panels, consider **FilamentPHP** (a full admin panel framework), **Nova** (Laravel’s official admin tool), or **Backpack for Laravel** (a more opinionated CRUD solution). Unlike this package, these alternatives offer broader customization but may lack Vormia-specific integrations. If you’re not using Vormia, **Filament** or **Nova** might be more flexible for standalone projects.
- How do I test the admin panel components in my Laravel app?
- Test Livewire components using Laravel’s testing helpers like `actingAs()` for auth and `render()` for component rendering. For Flux sidebar integration, test that the `flux-sidebar` directive injects correctly into your Blade layouts. Use `Livewire::test()` for component-specific assertions. Mock Vormia’s Role model if testing role logic, and ensure your tests cover edge cases like validation errors or permission denials.
- What happens if Vormia updates its Role model or schema in a future release? Will this package break?
- The package is tied to Vormia’s Role model, so schema changes (e.g., renamed fields or added constraints) could break role assignment logic. Monitor Vormia’s changelog and update the package or override its dependencies if needed. For critical projects, consider forking the package or creating a wrapper layer to isolate Vormia-specific code from your admin panel logic.