|
123456789101112131415161718192021222324 |
- <?php
-
- namespace App\Console\Commands;
-
- use Exception;
- use Illuminate\Console\Command;
- use App\Knockout\Thread;
-
- class Popular extends Command {
-
- protected $name = 'knockout:popular';
- protected $description = 'Fetch popular thread list';
-
- public function handle()
- {
- try {
- Thread::updatePopular();
- echo '[ OK ] Popular threads cached' . PHP_EOL;
- } catch (Exception $e) {
- echo '[FAIL] Popular threads cached' . PHP_EOL;
- }
- }
-
- }
|