michaelnabil230 / laravel-weather
Package for get the weather data
Fund package maintenance!
MichaelNabil230
Requires
- php: ^8.2
- illuminate/contracts: v11.10.0
- spatie/laravel-package-tools: ^1.16.4
Requires (Dev)
- larastan/larastan: v2.9.7
- laravel/pint: v1.16.0
- nunomaduro/collision: v8.1.1
- orchestra/testbench: v9.1.2
- pestphp/pest: v2.34.7
- pestphp/pest-plugin-arch: v2.7.0
- pestphp/pest-plugin-laravel: v2.4.0
- phpstan/extension-installer: ^1.3.1
- phpstan/phpstan-deprecation-rules: ^1.2.0
- phpstan/phpstan-phpunit: ^1.4.0
This package is auto-updated.
Last update: 2024-11-21 01:38:02 UTC
README
Download Meteorological Data from OPEN-METEO API (https://open-meteo.com/en)
Open-Meteo collaborates with National Weather Services providing Open Data with 11 to 2 km resolution. Our high performance APIs select the best weather model for your location and provide data as a simple JSON API.
APIs are free without any API key for open-source developers and non-commercial use. You can embed them directly into your app.
Installation
You can install the package via composer:
composer require michaelnabil230/laravel-weather
You can publish the config file with:
php artisan vendor:publish --tag="laravel-weather-config"
This is the contents of the published config file:
return [ 'temperature_unit' => 'celsius', 'wind_speed_unit' => 'kmh', 'precipitation_unit' => 'mm', 'time_format' => 'iso8601', 'timezone' => 'GMT', ];
Usage
$weather = \MichaelNabil230\Weather\Weather::location(30.0812558, 31.2511902) ->current() ->get();
Functions:
15-minutely Functions:
Hourly Functions:
Daily Functions:
WMO Weather interpretation codes (WW):
Testing
composer test
Support
Or
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.