A tile for Laravel Dashboard that displays football standings of different leagues
kayschima/laravel-dashboard-footballdata-standings-tile is a Laravel package for a tile for laravel dashboard that displays football standings of different leagues.
It currently has 0 GitHub stars and 90 downloads on Packagist (latest version 1.0.1).
Install it with composer require kayschima/laravel-dashboard-footballdata-standings-tile.
Discover more Laravel packages by kayschima
or browse all Laravel packages to compare alternatives.
Last updated
This tile can used on the Laravel Dashboard to display standings from www.football-data.org.
The MIT License (MIT). Please see License File for more information.
You can install the tile via composer:
composer require kayschima/laravel-dashboard-footballdata-standings-tile
In the dashboard config file, you must add this configuration in the tiles key.
Sign up at https://www.football-data.org/ to obtain FOOTBALLDATA_API_KEY.
Set FOOTBALL_LEAGUE to a league shortcut of the football-data.org service (e.g. BL1 or PL).
// in config/dashboard.php
return [
// ...
'tiles' => [
'footballstandings' => [
'footballdata_api_key' => env('FOOTBALLDATA_API_KEY'),
'football_league' => env('FOOTBALL_LEAGUE'),
]
],
];
In app\Console\Kernel.php you should schedule
Kayschima\FootballStandingsTile\Commands\FetchFootballStandingsDataCommand andKayschima\FootballStandingsTile\Commands\FetchFootballLiveResultsDataCommandto run every minute.
// in app/console/Kernel.php
use Kayschima\FootballStandingsTile\Commands\FetchFootballStandingsDataCommand;
use Kayschima\FootballStandingsTile\Commands\FetchFootballLiveResultsDataCommand;
protected function schedule(Schedule $schedule)
{
// ...
$schedule->command(FetchFootballStandingsDataCommand::class)->everyMinute();
$schedule->command(FetchFootballLiveResultsDataCommand::class)->everyMinute();
}
In your dashboard views you use
livewire:football-standings-tile component and/orlivewire:football-live-results-tile component.An optional $highlight-attribute to the livewire:football-standings-tile triggers a simple highlighting of e.g. the local or favourite team what is expected to be a common use case for the tile.
For simplicity, this commit uses the id of the team, specific to every competition -- "4" in this case for BVB @ 1. Bundesliga.
<x-dashboard>
<livewire:football-standings-tile position="a1" highlight="4" />
<livewire:football-live-results-tile position="b1"/>
</x-dashboard>
php artisan vendor:publish --provider="Kayschima\FootballStandingsTile\FootballStandingsTileServiceProvider" --tag="dashboard-football-standings-tile-views"