All Projects → gnahotelsolutions → Laravel Weather

gnahotelsolutions / Laravel Weather

Licence: mit
🌤️ A wrapper around Open Weather Map API (Current weather)

Projects that are alternatives of or similar to Laravel Weather

Simple Qrcode
An easy-to-use PHP QrCode generator with first-party support for Laravel.
Stars: ✭ 1,923 (+5241.67%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Laravel Query Monitor
Simple artisan command to monitoring triggered queries
Stars: ✭ 230 (+538.89%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Laravelresources
Speed Up package development for Laravel Apps with API's
Stars: ✭ 152 (+322.22%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Laravel Schedulable
Schedule and unschedule eloquent models elegantly without cron jobs
Stars: ✭ 78 (+116.67%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Validator Docs
Validação de CPF, CNPJ, CNH, NIS, Título Eleitoral e Cartão Nacional de Saúde com Laravel.
Stars: ✭ 334 (+827.78%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Laravel Mail Editor
MailEclipse ⚡ Laravel Mailable Editor!
Stars: ✭ 1,714 (+4661.11%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Wagonwheel
Offer an online version of your Laravel emails to users.
Stars: ✭ 224 (+522.22%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Lara Lens
Laravel package for display diagnostic (config, database, http connections...)
Stars: ✭ 96 (+166.67%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Laravel Starter
A CMS like modular starter application project built with Laravel 8.x.
Stars: ✭ 299 (+730.56%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Laravel Gamp
📊 Laravel Google Analytics Measurement Protocol Package
Stars: ✭ 271 (+652.78%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Laravel Surveillance
Put malicious users, IP addresses and anonymous browser fingerprints under surveillance, log the URLs they visit and block malicious ones from accessing the Laravel app.
Stars: ✭ 198 (+450%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Telegram
✈️ Telegram Notifications Channel for Laravel
Stars: ✭ 450 (+1150%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Dark Sky Api
PHP Library for the Dark Sky API.
Stars: ✭ 70 (+94.44%)
Mutual labels:  weather, laravel, laravel-package
Bagisto
An easy to use, free and open source laravel eCommerce platform to build your online shop in no time.
Stars: ✭ 4,140 (+11400%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Orm
A drop-in Doctrine ORM 2 implementation for Laravel 5+ and Lumen
Stars: ✭ 712 (+1877.78%)
Mutual labels:  hacktoberfest, laravel, laravel-package
Laravel Blade Directives
A collection of nice Laravel Blade directives
Stars: ✭ 813 (+2158.33%)
Mutual labels:  laravel, laravel-package
Laravel Notify
Flexible Flash notifications for Laravel
Stars: ✭ 787 (+2086.11%)
Mutual labels:  laravel, laravel-package
Package Skeleton
📦 My base for PHP packages.
Stars: ✭ 6 (-83.33%)
Mutual labels:  laravel, laravel-package
Simple Cache
An easy to use Caching trait for Laravel's Eloquent Models.
Stars: ✭ 19 (-47.22%)
Mutual labels:  laravel, laravel-package
Laravel Adminpanel
A Laravel Admin Panel (Laravel Version : 6.0)
Stars: ✭ 774 (+2050%)
Mutual labels:  hacktoberfest, laravel

Laravel Open Weather Map Wrapper

Latest Version on Packagist Build Status Quality Score Total Downloads

🌤️ A wrapper around Open Weather Map API (Current weather)

Installation

You can install the package via composer:

composer require gnahotelsolutions/laravel-weather

Usage

Fill the WEATHER_API_KEY environment variable with your own API key to query the server.

use GNAHotelSolutions\Weather\Weather;

$weather = new Weather();

// Checking weather by city name
$currentWeatherInGirona = json_decode($weather->get('girona,es'));

// You can use the city id, this will get you unambiguous results
$currentWeatherInGirona = json_decode($weather->find('3121456'));

Units

By default the package uses metric for Celsius temperature results, this can be modified using the configuration file or on the fly:

$weather = new Weather();

$currentWeatherInGirona = json_decode($weather->inUnits('imperial')->get('girona,es'));

Language

By default the package uses es for the description translation, this can be modified using the configuration file or on the fly:

$weather = new Weather();

$currentWeatherInGirona = json_decode($weather->inLanguage('en')->get('girona'));

Guzzle Client Instance

If you need to use another instance of Guzzle, to modify headers for example:

$weather = new Weather();

$guzzle = $this->getSpecialGuzzleClient();

$currentWeatherInGirona = json_decode($weather->using($guzzle)->get('girona'));

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].