- What Laravel versions does Vormia officially support?
- Vormia is explicitly designed for Laravel 12 and requires Livewire 4 or Inertia.js for frontend integration. The package leverages modern Laravel features like Eloquent 12 and Sanctum for API auth, so ensure your project aligns with these versions to avoid compatibility issues.
- How do I install Vormia and set up RBAC in my Laravel app?
- Run `composer require vormiaphp/vormia` and execute `php artisan vormia:install`. This generates migrations, middleware, and API routes. Follow the prompts to configure roles, permissions, and media handling. The package includes a Postman collection for API testing out of the box.
- Can Vormia replace Laravel Nova for admin panel needs?
- Vormia offers lightweight RBAC and user management but lacks Nova’s polished UI and built-in resource management. It’s better suited for custom admin panels where you need granular control over permissions and media processing without Nova’s overhead.
- Does Vormia work with existing user models or do I need to migrate?
- Vormia requires manual extension of your User model (e.g., adding `HasApiTokens` traits). If you’re using Laravel Fortify or Sanctum, you’ll need to merge Vormia’s traits or middleware into your existing auth flow. Backup your database before testing.
- What frontend frameworks does Vormia support, and are there trade-offs?
- Vormia supports Livewire (server-driven) and Inertia.js (SPA-like). Livewire integration includes jQuery/Select2 dependencies, which may conflict with modern SPAs. Inertia.js users get lighter API endpoints but must handle CSS/JS manually. Choose based on your stack’s maturity.
- How does Vormia handle media uploads and processing?
- Vormia integrates with Intervention Image for resizing/cropping and includes a `MediaForge` service for handling uploads. It stores files in `storage/app/public` by default but allows custom paths. For large-scale apps, consider pairing it with a dedicated CDN or cloud storage.
- Is Vormia’s permission system flexible enough for complex hierarchies?
- Vormia’s RBAC system uses roles and permissions but may struggle with deeply nested hierarchies (e.g., multi-level admin tiers). Test edge cases like role inheritance or dynamic permissions early—undiscovered bugs are a risk given the package’s low adoption.
- Can I use Vormia in a headless Laravel API without Livewire/Inertia?
- Yes, Vormia’s Sanctum integration and `api-auth` middleware work standalone for headless APIs. Focus on the `User` model extensions and API routes generated by `vormia:install`. Skip frontend-specific features like Livewire components or Select2 dependencies.
- What are the risks of Vormia’s dependency on Intervention/Image?
- Intervention/Image is a hard dependency, and its maintenance status could impact Vormia. Monitor for security patches or version conflicts. If your project avoids external image libraries, Vormia may not be ideal—consider Spatie’s `laravel-medialibrary` instead.
- How do I migrate from Vormia to another package like Spatie’s Laravel-Permission?
- Vormia’s RBAC logic isn’t easily extractable due to tight coupling with its models and middleware. Document your customizations early, then manually map Vormia’s migrations (e.g., `roles`, `permissions`) to Spatie’s schema. Test thoroughly—direct replacements often require refactoring.