- How do I install this tile in my Laravel Dashboard?
- Run `composer require spatie/laravel-dashboard-belgian-trains-tile` and register the tile in your Laravel Dashboard configuration. Ensure you’re using Laravel Dashboard v4+ and Livewire 2/3. Follow Spatie’s [documentation](https://docs.spatie.be/laravel-dashboard) for tile integration steps.
- Does this tile work with Laravel 9 or 10?
- Yes, the package supports Laravel 8+ (including 9 and 10) as long as you’re using Livewire 2/3 and Laravel Dashboard v4+. Check compatibility with your Livewire version in the [README](https://github.com/spatie/laravel-dashboard-belgian-trains-tile).
- Can I customize the timezone for train times?
- The tile defaults to local Belgian time (CET/CEST) but lacks built-in timezone overrides. For custom timezones, you’ll need to extend the Livewire component or patch the timezone logic manually. The 4.0.2 update fixes UTC vs. local time rendering, but DST transitions may still require adjustments.
- What happens if the NMBS API is down or rate-limited?
- The tile has no built-in fallback for API failures—it will display an error state if NMBS’s API is unavailable. For production use, consider caching responses with Redis or implementing a mock API layer in tests to simulate outages and improve resilience.
- Can I use this tile outside Laravel (e.g., with React/Vue)?
- No, this package is tightly coupled to Laravel Dashboard and Livewire. It won’t work in standalone React, Vue, or non-Laravel stacks. For other frameworks, you’d need to build a custom integration or use NMBS’s public API directly.
- How often does the tile refresh train data?
- The refresh interval isn’t configurable in the package. By default, it relies on Livewire’s polling mechanism, which may introduce latency. For high-frequency updates (e.g., every 30 seconds), test performance impact on dashboard load times, especially if NMBS’s API has rate limits.
- Is there a way to style the tile to match my brand?
- The tile uses Tailwind CSS classes, so you can override styles via Laravel Dashboard’s theme system. However, deep customization (e.g., NMBS colors vs. your palette) may require extending the Livewire component or overriding Tailwind utilities. Check Spatie’s [theming docs](https://docs.spatie.be/laravel-dashboard/customization) for details.
- Does this package support other transit providers (e.g., Thalys, De Lijn)?
- No, the package is hardcoded to NMBS/SNCB Belgian trains with no abstraction layer for other providers. To support additional transit systems, you’d need to fork the package and refactor the API calls, which isn’t officially supported.
- Are there any known issues with DST transitions (CET ↔ CEST)?
- The 4.0.2 update fixes UTC vs. local time rendering, but DST transitions could still cause inconsistencies if the dashboard server and user timezone don’t align. Test the tile during transition periods (e.g., March/October) to ensure accurate time display for Belgian users.
- How do I test this tile in my CI pipeline?
- Run `composer test` to execute the package’s test suite, which covers basic functionality. For edge cases (e.g., API timeouts), mock NMBS’s API in your tests using tools like [VCR](https://github.com/vcr/vcr) or [Pest](https://pestphp.com/) to simulate failures and validate error handling.