carbon subtract days code example
Example 1: carbon subdays
$users = Users::where('status_id', 'active')
->where( 'created_at', '>', Carbon::now()->subDays(30))
->get();
Example 2: carbon subtract two dates
$date = Carbon::parse('2016-09-17 11:00:00');
$now = Carbon::now();
$diff = $date->diffInDays($now);