Completed
Push — master ( 4f00d5...2afce4 )
by John
29s queued 13s
created

UpdateTrendingGroups::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Console\Commands\Scheduling;
4
5
use Illuminate\Console\Command;
6
use App\Models\GroupModel;
7
use Carbon;
8
9
class UpdateTrendingGroups extends Command
10
{
11
    /**
12
     * The name and signature of the console command.
13
     *
14
     * @var string
15
     */
16
    protected $signature='scheduling:updateTrendingGroups';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description='Scheduling for trending groups update';
24
25
    /**
26
     * Create a new command instance.
27
     *
28
     * @return void
29
     */
30
    public function __construct()
31
    {
32
        parent::__construct();
33
    }
34
35
    /**
36
     * Execute the console command.
37
     *
38
     * @return mixed
39
     */
40
    public function handle()
41
    {
42
        $time=Carbon::now();
43
        $this->line("<fg=yellow>[$time] Processing:  </>Update Trending Groups");
44
45
        $groupModel = new GroupModel();
46
        $groupModel->cacheTrendingGroups();
47
48
        $time=Carbon::now();
49
        $this->line("<fg=green>[$time] Processed:   </>Successfully Updated Trending Groups");
50
    }
51
}
52