PHP code example of jeop10 / laravel-dashboard-reddit-tile

1. Go to this page and download the library: Download jeop10/laravel-dashboard-reddit-tile library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jeop10 / laravel-dashboard-reddit-tile example snippets


// 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,
                ],
                //...
            ]
        ]   
    ]   
];