jonlynch/laravel-dashboard-uk-tide-tile

A package to add UK tide tiles to Laravel Dashboard

v1.0 2020-10-07 20:02 UTC

This package is auto-updated.

Last update: 2024-09-08 04:51:52 UTC


README

Latest Version on Packagist Total Downloads

A package to show UK tide information on the Laravel Dashboard.

Installation

You can install the package via composer:

$ composer require jonlynch/laravel-dashboard-uk-tide-tile

Usage

In your dashboard view you use the livewire:uk-tide-tile component.

<x-dashboard>
    <livewire:uk-tide-tile position="a1"/>
</x-dashboard>

Add the config to the tiles sections of your config/dashboard.php

// in config/dashboard.php

return [
    // ...
    tiles => [
         'tides' => [
            'api_key' => env ('TIDE_API_KEY'),
            'station_id' => '0435',
            'location' => 'St Bees'
        ],
    ]

In app\Console\Kernel.php you should schedule the JonLynch\TideTile\Commands\FetchMetOfficeDataCommand to run every hour.

// in app\Console\Kernel.php

protected function schedule(Schedule $schedule)
{
    $schedule->command(\JonLynch\TideTile\Commands\FetchTidesDataCommand::class)->hourly();
}

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email Jon Lynch instead of using the issue tracker.

Credits

License

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