Build a weather app with PHP Dark Sky API (Laravel is supported)
Dark Sky API is a good PHP package which we can use to get data from Dark Sky weather easily.
if you want to build a weather app, this is a must-have package. This package has been rebuilt from scratch (the old version was Laravel Dark Sky)
The previous version was limited to only the Laravel developers (because it was the Laravel package). Now it is stand-alone PHP Library with Laravel support implemented.
Features
But that's not all of the changes. The package itself improved a lot:
-
contracts added;
-
validation layer added;
-
object-level access for all of the properties that API provides,
including Response Headers, Weather Alerts, and Flags
(and of course for the Weather Response, Data Block and Data Point props);
-
HTTP compression for all requests;
-
multiple Time Machine Requests are sent concurrently;
-
fully documented by PHPDoc blocks;
-
100% covered by tests;
Demo
Live demo
https://skygetty.com/forecast/36.7783,-119.4179/si/en
Installation
Install the package via Composer:
composer require dmitry-ivanov/dark-sky-api
Introduction
https://medium.com/@dmitry.g.ivanov/weather-forecast-in-php-95bca6b0ed18
Source Code
This post is submitted by our members. Submit a new post.
Tags: Tutorials Packages Sources Laravel 5.7 Laravel 5.6 Laravel 5.5 Laravel 5 Intermediate