LaravelPackages.net
Acme Inc.
Toggle sidebar
torann/laravel-weather

Simple weather forecaster for Laravel

315
33
0.1.0
About torann/laravel-weather

torann/laravel-weather is a Laravel package for simple weather forecaster for laravel. It currently has 33 GitHub stars and 315 downloads on Packagist (latest version 0.1.0). Install it with composer require torann/laravel-weather. Discover more Laravel packages by torann or browse all Laravel packages to compare alternatives.

Last updated

NOTICE This package no longer works as intended, the endpoint it uses no longer exists

Laravel Weather

Latest Stable Version Total Downloads

Just a simple weather package for Laravel.


Installation

To get the latest version of Laravel Weather simply require it in your composer.json file.

"torann/laravel-weather": "0.1.*@dev"

You'll then need to run composer install to download it and have the autoloader updated.

Once installed you need to register the service provider with the application. Open up app/config/app.php and find the providers key.

'providers' => [
    'Torann\LaravelWeather\ServiceProvider',
]

NOTE: the is automatically registered during boot.

Publish package assets:

$ php artisan asset:publish torann/laravel-weather

Add the following to the page where the Laravel Weather widget script will be active:

{{ HTML::style('/packages/torann/laravel-weather/weather.css') }} 

If using Duct add this to the CSS manifest file:

 *= require torann/laravel-weather/weather.css

Rendering

Rendering weather by point:

Weather::renderByPoint($lat, $lng)

Rendering weather by city name:

Weather::renderByName('Hamden, CT')

Example

An live example can be seen on Snowcrew.org

Example.png

Comments