3 namespace BookStack\Console\Commands;
5 use BookStack\Activity;
6 use Illuminate\Console\Command;
8 class ClearActivity extends Command
11 * The name and signature of the console command.
15 protected $signature = 'bookstack:clear-activity';
18 * The console command description.
22 protected $description = 'Clear user activity from the system';
27 * Create a new command instance.
29 * @param Activity $activity
31 public function __construct(Activity $activity)
33 $this->activity = $activity;
34 parent::__construct();
38 * Execute the console command.
42 public function handle()
44 $this->activity->newQuery()->truncate();
45 $this->comment('System activity cleared');