3 namespace BookStack\Console\Commands;
5 use BookStack\Activity\Models\View;
6 use Illuminate\Console\Command;
8 class ClearViewsCommand extends Command
11 * The name and signature of the console command.
15 protected $signature = 'bookstack:clear-views';
18 * The console command description.
22 protected $description = 'Clear all view-counts for all entities';
25 * Execute the console command.
27 public function handle(): int
29 View::query()->truncate();
30 $this->comment('Views cleared');