]> BookStack Code Mirror - bookstack/blob - app/Console/Commands/ClearViews.php
Apply fixes from StyleCI
[bookstack] / app / Console / Commands / ClearViews.php
1 <?php
2
3 namespace BookStack\Console\Commands;
4
5 use BookStack\Actions\View;
6 use Illuminate\Console\Command;
7
8 class ClearViews extends Command
9 {
10     /**
11      * The name and signature of the console command.
12      *
13      * @var string
14      */
15     protected $signature = 'bookstack:clear-views';
16
17     /**
18      * The console command description.
19      *
20      * @var string
21      */
22     protected $description = 'Clear all view-counts for all entities';
23
24     /**
25      * Create a new command instance.
26      */
27     public function __construct()
28     {
29         parent::__construct();
30     }
31
32     /**
33      * Execute the console command.
34      *
35      * @return mixed
36      */
37     public function handle()
38     {
39         View::clearAll();
40         $this->comment('Views cleared');
41     }
42 }