Package Data | |
---|---|
Maintainer Username: | torann |
Maintainer Contact: | daniel@lyften.com (Daniel Stainback) |
Package Create Date: | 2014-10-06 |
Package Last Update: | 2017-05-30 |
Home Page: | http://lyften.com/projects/laravel-weather |
Language: | PHP |
License: | BSD 2-Clause |
Last Refreshed: | 2024-11-22 03:11:18 |
Package Statistics | |
---|---|
Total Downloads: | 314 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 33 |
Total Watchers: | 5 |
Total Forks: | 10 |
Total Open Issues: | 2 |
NOTICE This package no longer works as intended, the endpoint it uses no longer exists
Just a simple weather package for Laravel.
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.
$ 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 weather by point:
Weather::renderByPoint($lat, $lng)
Rendering weather by city name:
Weather::renderByName('Hamden, CT')
An live example can be seen on Snowcrew.org