PHP code example of solitweb / laravel-dashboard-weather-forecast-tile
1. Go to this page and download the library: Download solitweb/laravel-dashboard-weather-forecast-tile library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
solitweb / laravel-dashboard-weather-forecast-tile example snippets
// in config/dashboard.php
return [
// ...
'tiles' => [
'weather_forecast' => [
'open_weather_map_key' => env('OPEN_WEATHER_MAP_KEY'),
'open_weather_map_city' => 'Antwerp',
'units' => 'metric', // 'metric' or 'imperial' (metric is default)
'locale' => 'en_US',
],
],
];
// in app/console/Kernel.php
protected function schedule(Schedule $schedule)
{
// ...
$schedule->command(\Solitweb\WeatherForecastTile\FetchDataFromApiCommand::class)->everyMinute();
}
bash
php artisan vendor:publish --provider="Solitweb\WeatherForecastTile\WeatherForecastTileServiceProvider" --tag="dashboard-weather-forecast-tile-views"