Answers for "carbon subtract days"

PHP
2

carbon subdays

//Laravel example

$users = Users::where('status_id', 'active')
           ->where( 'created_at', '>', Carbon::now()->subDays(30))
           ->get();
Posted by: Guest on November-08-2021
0

carbon subtract two dates

$date = Carbon::parse('2016-09-17 11:00:00');
$now = Carbon::now();

$diff = $date->diffInDays($now);
Posted by: Guest on April-22-2021
0

carbon subdays

$users = Users::where('status_id', 'active')
           ->where( 'created_at', '>', Carbon::now()->subDays(30))
           ->get();
Posted by: Guest on January-26-2021

Browse Popular Code Answers by Language