Are there any way to get difference of two days (today & created_at) using laravel query?
I have tried as follows.but that didn't work for me
public function scopeActivatedOrders($query,$currentDate){
return $query->select('*')
->where('orders.activated', '=', '1')
->where('DATEDIFF(order.arrived_date,$currentDate)','>','14')->get();
}
Thank you!