jeop10/laravel-dashboard-reddit-tile 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

jeop10/laravel-dashboard-reddit-tile

Composer 安装命令:

composer require jeop10/laravel-dashboard-reddit-tile

包简介

A reddit tile for Spatie's Laravel dashboard

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This tile can display a list of the post to your favorite subreddit.

img

This tile can be used on the Laravel Dashboard.

Installation

You can install the package via composer:

composer require jeop10/laravel-dashboard-reddit-tile

Usage

In the dashboard config file, you must add this configuration in the tiles key.

// in config/dashboard.php

return [
    // ...
    'tiles' => [
        'reddit' => [
            'general' => [
                'useragent' => 'web:laravel-dashboard-reddit-tile:0.1',
                'timezone' => 'Your desired timezone', //Important to get the posted at
            ],
            'configurations' => [
                'default' => [
                    'subreddit' => 'aww',
                    'sort_by' => 'hot', // valid values are hot, new, rising, controversial, top
                    'refresh_interval_in_seconds' => 120,
                ],
                'covid' => [
                    'subreddit' => 'coronavirus',
                    'sort_by' => 'new',
                    'refresh_interval_in_seconds' => 60,
                ],
                //...
            ]
        ]   
    ]   
];

In app\Console\Kernel.php you should schedule the Dustycode\RedditTile\ListenForRedditPostsCommand to run. You can let in run every minute if you want. You could also run is less frequently if you fast updates on the dashboard aren’t that important for this tile.

// in app/console/Kernel.php

protected function schedule(Schedule $schedule)
{
    // ...
    $schedule->command(Dustycode\RedditTile\ListenForRedditPostsCommand::class)->everyMinute();
}

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

<x-dashboard>
    <livewire:reddit-tile position="a1:a4" configuration-name="default" title="r/Aww"/>
</x-dashboard>

The title attribute is optional

Testing

composer test

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 :author_email instead of using the issue tracker.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固