2016-08-05 12 views

Antwort

1
$days = 10; 

DB::table('on_search') 
    ->whereRaw('search_date < NOW() - INTERVAL ? DAY', [$days]) 
    ->delete(); 
0

Sie können auch Datum-Manipulation in PHP mit der Carbon-Klasse.

// Top of file. 
use Carbon\Carbon; 

DB::table('table_name)->where('search_date', '<', Carbon::now()->subDay(10));