承接 kayschima/laravel-dashboard-footballdata-standings-tile 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kayschima/laravel-dashboard-footballdata-standings-tile

Composer 安装命令:

composer require kayschima/laravel-dashboard-footballdata-standings-tile

包简介

A tile for Laravel Dashboard that displays football standings of different leagues

README 文档

README

Latest Version on PackagistTotal Downloads

This tile can used on the Laravel Dashboard to display standings from www.football-data.org.

License

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

Installation

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

  • the Kayschima\FootballStandingsTile\Commands\FetchFootballStandingsDataCommand and
  • the Kayschima\FootballStandingsTile\Commands\FetchFootballLiveResultsDataCommand

to 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();
}      

Views

In your dashboard views you use

  • the livewire:football-standings-tile component and/or
  • the livewire: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>

Customizing the views

php artisan vendor:publish --provider="Kayschima\FootballStandingsTile\FootballStandingsTileServiceProvider" --tag="dashboard-football-standings-tile-views"

统计信息

  • 总下载量: 90
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固