mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Updated command classes to include "Command" in name
This commit is contained in:
33
app/Console/Commands/ClearActivityCommand.php
Normal file
33
app/Console/Commands/ClearActivityCommand.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace BookStack\Console\Commands;
|
||||
|
||||
use BookStack\Activity\Models\Activity;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ClearActivityCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'bookstack:clear-activity';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Clear user activity from the system';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
Activity::query()->truncate();
|
||||
$this->comment('System activity cleared');
|
||||
return 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user