kregel/nova-weather-cards

0.0.1 2018-11-20 02:20 UTC

This package is auto-updated.

Last update: 2024-12-07 07:14:06 UTC


README

Redis based storage, and powered by darksky.net

All you will need is a developer token from darksky, and predis for key persistence.

Latest Version on Packagist Total Downloads

Screenshot

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require predis/predis
composer require kregel/nova-weather-cards

Next up, you must register the tool with Nova. This is typically done in the cards method of the NovaServiceProvider.

Usage

// in app/Providers/NovaServiceProvider.php

// ...

public function cards()
{
    return [
        // ...
        (new \Kregel\NovaWeatherCards\Weather)->withMeta([
            'name' => 'San Francisco',
            'coords' => [
                37.7749,
                122.4194,
            ]
        ]),
        // If you don't define coordinates it will default to your location.
        (new \Kregel\NovaWeatherCards\Weather)->withMeta([
            'name' => 'Current location',
        ]),
        // Or you could forego all configuration. (which will default to no title, and your current location)
        new \Kregel\NovaWeatherCards\Weather,
    ];
}

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email github@austinkregel.com instead of using the issue tracker.

Credits

License

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

Support on Beerpay

Hey dude! Help me out for a couple of 🍻!

Beerpay Beerpay