Reddit tile for Laravel Dashboard.
This tile can display a list of the post to your favorite subreddit.
This tile can be used on the Laravel Dashboard.
You can install the package via composer:
composer require jeop10/laravel-dashboard-reddit-tile
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
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email :author_email instead of using the issue tracker.
- All Contributors
- File Icon by Raj Dev URL: Link
- Web Icon by Raj Dev URL: Link
The MIT License (MIT). Please see License File for more information.