- How do I install the Laravel Panel package?
- Run `composer require mylaraveltools/panel` to install via Composer. Ensure your project uses Laravel 8+, Livewire 2.x, and Tailwind CSS 3.x. Follow the README’s setup steps, including publishing assets with `php artisan vendor:publish` and registering the panel routes in `routes/web.php`.
- Does this panel work with Laravel 9 or 10?
- The package targets Laravel 8+ and assumes Livewire 2.x, which is compatible with Laravel 9/10. Check the GitHub repo for version-specific updates, as newer Laravel releases may require adjustments to Livewire or Tailwind integrations.
- Can I customize the monochrome design or use my own Tailwind theme?
- Yes, the panel is built with Tailwind, so you can override its default styles by extending the provided CSS or publishing and modifying the Tailwind config. For deeper customization, override Blade templates in `resources/views/vendor/panel` or extend the `PanelBuilder` class.
- Will this panel work with Inertia.js or Vue/React frontends?
- No, this panel relies on Blade templates and Livewire, which may conflict with Inertia.js or SPAs like Vue/React. If you’re using those, consider alternatives like Filament or Nova, which support headless or API-driven setups.
- How do I bind Eloquent models to panel widgets?
- Use Livewire components to fetch and display data. For example, create a Livewire component like `UserPanel` that queries Eloquent models (e.g., `User::all()`) and binds them to properties. The panel’s widgets can then render these properties dynamically.
- Is the panel optimized for production performance?
- The panel includes Livewire (~500KB JS), which may impact metrics like LCP or TTI. Optimize by enabling Tailwind’s JIT compiler, using PurgeCSS, and lazy-loading non-critical components. For high-traffic apps, consider splitting the panel into micro-frontends.
- Are there alternatives if I need a more flexible admin panel?
- Yes, alternatives include Laravel Nova (paid, feature-rich), Filament (modern, customizable), Backpack (traditional CRUD), or Orchid (modular). These offer more design flexibility, API support, or headless compatibility, depending on your needs.
- How do I add custom routes or middleware to the panel?
- Extend the panel’s routing by modifying the `PanelServiceProvider` or overriding the `routes()` method. For middleware, bind it to the panel’s routes in `routes/web.php` or use Laravel’s middleware groups to apply it globally to admin routes.
- Does the panel support multi-tenancy or role-based access control (RBAC)?
- Out of the box, the panel is agnostic to multi-tenancy but can integrate with Laravel’s built-in auth or packages like Spatie’s Laravel-Permission for RBAC. Customize middleware or Livewire policies to enforce tenant-specific or role-based access.
- How do I test the panel in a CI/CD pipeline?
- Test the panel by writing Livewire component tests (e.g., `php artisan make:livewire-test`) and Blade template tests. Ensure Tailwind and Livewire assets are built in your pipeline. Mock Eloquent models in unit tests to verify data binding and widget rendering.