- How do I install and configure Laravel Livewire Panel for a Bootstrap 5 admin dashboard?
- Run `composer require alp-develop/laravel-livewire-panel` and execute `php artisan panel:install`. Choose Bootstrap 5 in the theme selection, set your URL prefix (e.g., `admin`), and confirm other options like gate driver (Spatie/Laravel) and CDN libraries. The installer publishes views and config files automatically.
- Can I use this package with Laravel Breeze or Jetstream for authentication?
- Yes, the package integrates seamlessly with Laravel Breeze/Jetstream. During installation, select your preferred gate driver (Laravel Gates or Spatie) and ensure your auth routes align with the panel’s middleware. The panel’s login system will work alongside your existing auth scaffolding.
- What’s the best way to create custom widgets or plugins for the panel?
- Use the built-in Artisan commands: `php artisan panel:make-widget` for reusable UI elements (e.g., stats cards) or `php artisan panel:make-plugin` for modular features (e.g., search, notifications). Widgets/plugins follow Livewire’s component structure and can be placed in the panel’s sidebar or content area via configuration.
- Does this package support multiple admin panels (e.g., admin, vendor, customer) in one Laravel app?
- Yes, the package supports multi-panel setups by allowing distinct URL prefixes (e.g., `/admin`, `/vendor`) and panel IDs. Each panel can have its own navigation, widgets, and authorization gates. Configure routes with the `panel.{panelId}.` naming convention and use the `PanelAuthMiddleware` for each panel’s routes.
- How do I override the default login or 404 page to match my brand?
- Publish the panel views with `php artisan vendor:publish --tag=panel-views` and override the default templates in `resources/views/vendor/panel`. Modify files like `auth/login.blade.php` or `errors/404.blade.php` while preserving the panel’s layout structure. Use CSS variables (e.g., `--panel-primary`) for consistent theming.
- Will this package work with Tailwind CSS, and how do I customize its styles?
- Tailwind CSS is fully supported as a theme option. After selecting Tailwind during installation, customize styles by extending the panel’s CSS variables in your `resources/css/app.css`. Override default classes (e.g., `.panel-sidebar`) or use Tailwind’s utilities to match your design system. The package includes a `panel:publish` command to expose its assets for customization.
- What are the performance implications of using Livewire Panel in a high-traffic Laravel app?
- The package uses Livewire’s built-in optimizations like memoization (e.g., `SearchRegistry`) and ETag caching to reduce redundant computations. For high-traffic scenarios, consider Laravel Octane for real-time performance gains. Monitor Livewire’s polling behavior (browser-dependent) and adjust the `panel.polling_interval` config if needed.
- How do I integrate this panel with Spatie’s Laravel Permission package for role-based access?
- Select Spatie as the gate driver during installation (`php artisan panel:install`). The panel will automatically use Spatie’s permissions for authorization. Define gates in `app/Providers/PanelServiceProvider.php` or use Spatie’s `can()` method in Livewire components. Ensure your Spatie middleware is applied alongside `PanelAuthMiddleware` in routes.
- Can I disable dark mode or localization features if I don’t need them?
- Yes, dark mode and localization (i18n) are optional. Dark mode toggles via LocalStorage and can be disabled by removing the toggle button from the panel’s navbar. For i18n, exclude the `panel::partials.lang-selector` view or configure only your needed locales in `config/panel.php`. The package won’t enforce these features if unused.
- What alternatives exist to Laravel Livewire Panel, and how does this compare?
- Alternatives include Filament, Nova, or Nova Panel. This package differs by offering a lightweight, modular Livewire-first approach without heavy dependencies. Unlike Filament (which is resource-heavy), Livewire Panel provides fine-grained control over widgets/plugins and integrates natively with Laravel’s routing/middleware. It’s ideal for developers who prefer Livewire’s simplicity over full-fledged admin suites.