- How do I integrate Grafana Loki logs into my Laravel app’s existing UI with this package?
- Publish the package’s config with `php artisan vendor:publish --tag=fluxui-loki-config`, then customize the `layout` setting in `config/fluxui-loki.php` to match your app’s Livewire layout (e.g., `components.layouts.app`). The `/logs` route will automatically use this layout, and you can add a sidebar nav link via `route('logs')`.
- What Laravel versions and dependencies does fluxui-loki support?
- This package requires PHP 8.2+, Laravel 11/12, Livewire 3/4, and Flux 2.x. It also mandates `livewire/flux-pro` for Pro components like date/time pickers and charts. Ensure your stack aligns with these requirements before installation.
- Can I use this package without Docker or Laravel Sail?
- No, this package is optimized for Docker/Sail environments where Loki is typically deployed (e.g., via Docker Compose). If Loki runs elsewhere, configure the `LOKI_URL` in `.env` to point to your Loki instance, but performance and label filtering may vary outside Docker contexts.
- How do I restrict access to the /logs page to specific users or roles?
- The package defaults to `web` and `auth` middleware, but you can override this in the config file. For role-based access, add middleware like `can:view-logs` to the `middleware` array in `config/fluxui-loki.php` and implement the logic in your auth system.
- Is there a way to avoid the livewire/flux-pro dependency for basic log querying?
- The core log querying functionality relies on Flux Pro for its date/time pickers and chart components. However, you could replace these with vanilla Livewire components (e.g., Alpine.js date pickers) by forking the package and removing Pro dependencies, though this requires custom development effort.
- How do I handle large log volumes or performance issues in production?
- Test your Loki server’s capacity under expected query loads, as this package offloads queries to Loki. For high-volume environments, consider adding rate limiting to the `/logs` route (e.g., via `throttle`) or caching frequent queries. Livewire’s reactivity may also impact frontend performance with large datasets.
- What if my Loki labels (e.g., service names) don’t match the default `compose_service`?
- Update the `service_label` in the config file to match your Loki label structure (e.g., `job` or `container_name`). The dropdown in the dashboard will then reflect the labels available in your Loki instance. Verify labels via the Loki API or Grafana Explore before configuring.
- Are there alternatives to fluxui-loki for Laravel log visualization?
- For open-source alternatives, consider building a custom Livewire dashboard with the [Loki PHP client](https://github.com/grafana/loki-client-php) or integrating Grafana Explore directly. Paid options like Tighten’s [Laravel Debugbar](https://github.com/barryvdh/laravel-debugbar) (for non-Loki logs) or third-party observability tools may also fit.
- How do I customize the UI beyond the default layout (e.g., sidebar placement, query filters)?
- Publish the package’s views with `php artisan vendor:publish --tag=fluxui-loki-views` to override Blade templates. Modify the `resources/views/vendor/fluxui-loki` files to adjust the sidebar, query filters, or table layout. For deeper changes, extend the Livewire component classes provided by the package.
- What’s the maintenance status of this package, and should I use it in production yet?
- This package is new (released 2026) with low GitHub activity (1 star). While it’s MIT-licensed and actively maintained by its authors, evaluate its fit for production by testing thoroughly in staging. Monitor the repo for updates, and consider contributing feedback or forks if critical features are missing.