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