PHP code example of astrodog / laravel-weather

1. Go to this page and download the library: Download astrodog/laravel-weather 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/ */

    

astrodog / laravel-weather example snippets


return [
    'temperature_unit' => 'celsius',
    'wind_speed_unit' => 'kmh',
    'precipitation_unit' => 'mm',
    'time_format' => 'iso8601',
    'timezone' => 'GMT',
];

$weather = \MichaelNabil230\Weather\Weather::location(30.0812558, 31.2511902)
    ->current()
    ->get();
bash
php artisan vendor:publish --tag="laravel-weather-config"