A package to add UK Met Office weather forecast tiles to Laravel Dashboard
jonlynch/laravel-dashboard-uk-weather-tile is a Laravel package for a package to add uk met office weather forecast tiles to laravel dashboard.
It currently has 0 GitHub stars and 41 downloads on Packagist (latest version v1.2).
Install it with composer require jonlynch/laravel-dashboard-uk-weather-tile.
Discover more Laravel packages by jonlynch
or browse all Laravel packages to compare alternatives.
Last updated
A weather forecast tile powered by Met Office data.
This tile can be used on the Laravel Dashboard.
You can install the package via composer:
$ composer require jonlynch/laravel-dashboard-uk-weather-tile
In your dashboard view you use the livewire:uk-weather-tile component. You may add more than one weather forecast by adding more locations.
<x-dashboard>
<livewire:uk-weather-tile position="a1:a2" location-name="St Bees"/>
<livewire:uk-weather-tile position="b1:b2" location-name="Scafell Pike"/>
</x-dashboard>
Add the config to the tiles sections of your config/dashboard.php
// in config/dashboard.php
return [
// ...
tiles => [
'ukweather' => [
'apikey' => env('MET_OFFICE_API_KEY'),
'locations' => [
'St Bees' => [
'lat' => '54.4891',
'lon' => '-3.6080',
],
'Scafell Pike' => [
'lat' => '54.4543',
'lon' => '-3.2115'
]
],
'refresh_interval_in_seconds' => 600,
]
]
In app\Console\Kernel.php you should schedule the JonLynch\UkWeatherTile\Commands\FetchMetOfficeDataCommand to run every 30 minutes.
// in app\Console\Kernel.php
protected function schedule(Schedule $schedule)
{
$schedule->command(\JonLynch\UkWeatherTile\Commands\FetchMetOfficeDataCommand::class)->everyThirtyMinutes();
}
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email :author_email instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.