|
|
@@ -45,7 +45,8 @@ class LogExpireDelete extends Command
|
|
|
|
|
|
public function deleteLog(){
|
|
|
//前150天
|
|
|
- $date=Carbon::now()->subDays(150)->format('Y-m-d');
|
|
|
+ $expire_duration=config('logging.expire_duration');
|
|
|
+ $date=Carbon::now()->subDays($expire_duration)->format('Y-m-d');
|
|
|
DB::table('logs')->where('created_at','like',$date.'%')->delete();
|
|
|
}
|
|
|
}
|