]> BookStack Code Mirror - bookstack/blob - app/Console/Commands/ClearViews.php
Added front-end toggle and testing of inline attachments
[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      */
28     public function __construct()
29     {
30         parent::__construct();
31     }
32
33     /**
34      * Execute the console command.
35      *
36      * @return mixed
37      */
38     public function handle()
39     {
40         View::clearAll();
41         $this->comment('Views cleared');
42     }
43 }