BookStackApp_BookStack/app/Console/Commands/ClearActivityCommand.php
Dan Brown 3946158e88
API: Added audit log list endpoint
Not yested covered with testing.
Changes database columns for more presentable names and for future use
to connect additional model types.
For #4316
2024-05-04 16:28:18 +01:00

34 lines
687 B
PHP

<?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 (audit-log) activity from the system';
/**
* Execute the console command.
*/
public function handle(): int
{
Activity::query()->truncate();
$this->comment('System activity cleared');
return 0;
}
}