Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Dashboard Time Weather Tile

Laravel Dashboard Time Weather Tile Laravel Package

spatie/laravel-dashboard-time-weather-tile

Laravel Dashboard tile by Spatie that shows current time plus local weather. Plug it into your dashboard to keep an eye on conditions at a glance, with configuration handled via the Laravel Dashboard ecosystem.

View on GitHub
Deep Wiki
Context7

A tile for Laravel Dashboard that displays the time and the weather

Frequently asked questions about Laravel Dashboard Time Weather Tile
How do I add this tile to my existing Laravel dashboard using spatie/laravel-dashboard?
First, ensure you have `spatie/laravel-dashboard` installed (v3.x+). Then, run `composer require spatie/laravel-dashboard-time-weather-tile`, publish the config if needed, and register the tile in your dashboard’s tile registry via the provided Blade directive or service provider. The package includes full documentation for step-by-step setup.
Which Laravel versions are supported by this package?
This package is officially tested and supported for Laravel 10+. While it may work on older versions (e.g., Laravel 9), no guarantees are provided. Always test thoroughly in your environment, especially if using PHP < 8.1, as dependencies may introduce compatibility risks.
Do I need a weather API key, and how do I configure it?
Yes, this tile requires a weather API key (e.g., from OpenWeatherMap or WeatherAPI). Store the key in your `.env` file under `WEATHER_API_KEY`. The package does not bundle an API—you must choose and configure one manually. Refer to the [documentation](https://docs.spatie.be/laravel-dashboard) for exact configuration steps.
What happens if the weather API fails or returns an error?
The package includes basic error handling, but you may need to extend it for production use. Consider implementing fallbacks like cached data or a placeholder UI. Monitor API reliability, especially if your dashboard relies on real-time weather for critical decisions.
Can I customize the time format or weather unit (Celsius/Fahrenheit) in the tile?
Yes, the tile supports customization via configuration. You can adjust the time format (e.g., 12-hour vs. 24-hour) and weather units in the published config file. Override defaults by modifying the `config/dashboard-time-weather-tile.php` file after publishing it with `php artisan vendor:publish`.
Will this tile work with my existing CSS framework (e.g., Bootstrap, Tailwind)?
The tile uses Tailwind CSS by default but is designed to be framework-agnostic. You can override its styles by extending the provided Blade template or targeting its CSS classes. Ensure your dashboard’s design system allows for custom tile styling without conflicts.
Is there a way to display weather for multiple locations or user-specific time zones?
The package displays weather for a single location by default, using Laravel’s configured time zone. To support multiple locations or user-specific time zones, you’ll need to extend the tile’s logic, likely by passing dynamic data (e.g., user preferences) to the tile’s view or using middleware to set the time zone per request.
Are there performance concerns with calling a weather API on every dashboard load?
Yes, external API calls can slow down dashboard rendering. Mitigate this by implementing caching (e.g., Laravel’s cache facade) or lazy-loading the tile. The package itself doesn’t include caching, so you’ll need to add it manually. Test under load to ensure responsiveness.
What are the alternatives to this package for adding time/weather to a Laravel dashboard?
Alternatives include building a custom tile using Laravel Blade and a weather API, or using third-party dashboard packages like Nova, Forge, or Filament UI, which may include built-in weather/time widgets. However, this package offers a lightweight, Spatie-optimized solution with minimal setup for existing `spatie/laravel-dashboard` users.
How do I test this tile in my Laravel application before deploying to production?
Start by installing the package in a staging environment and verifying the time display (check time zone and format). Test the weather API with mock responses or a free-tier API key to simulate success, failures, and rate limits. Use Laravel’s HTTP testing tools to validate tile rendering and edge cases like API downtime.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport