1. Go to this page and download the library: Download noki/weather-data-provider 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/ */
noki / weather-data-provider example snippets
php artisan optimize:clear
use Noki\WeatherDataProvider\WeatherConfig as WeatherConfig;
$config = WeatherConfig::create(1, '52.5202',13.4043);
use Noki\WeatherDataProvider\WeatherConfig as WeatherConfig;
$config = WeatherConfig::create(1, '52.5202',13.4043)->minutely()->hourly()->daily();
use Noki\WeatherDataProvider\WeatherConfig as WeatherConfig;
$config = WeatherConfig::create(1, '52.5202',13.4043)->minutely()->hourly()->daily(false);
use Noki\WeatherDataProvider\WeatherConfig as WeatherConfig;
$config = WeatherConfig::create(1, '52.5202',13.4043)->minutely()->hourly()->daily(false);
use Noki\WeatherDataProvider\WeatherConfig as WeatherConfig;
$config = WeatherConfig::create(1, '52.5202',13.4043)->temperature()->pressure()->wind()->humidity();
use Noki\WeatherDataProvider\WeatherConfig as WeatherConfig;
$config = WeatherConfig::create(1, '52.5202',13.4043)->imperial();
use Noki\WeatherDataProvider\WeatherConfig as WeatherConfig;
$config = WeatherConfig::create(1, '52.5202',13.4043)->metric();
use Noki\WeatherDataProvider\WeatherConfig as WeatherConfig;
use Noki\WeatherDataProvider\ProviderGenerator;
$config = WeatherConfig::create(1, '52.5202','13.4043');
$provider = new ProviderGenerator($config);
// Weather data for frequencies that you have choose
$provider->selected_provider->getCustomData();
bash
composer dump-autoload
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.