laravel carbon subtract days code example
Example 1: different days in carbon laravel between different dates
$created = new Carbon($survey->created_at);
$now = Carbon::now();
$difference = ($created->diff($now)->days < 1)
? 'today'
: $created->diffForHumans($now);
Example 2: carbon subdays
$users = Users::where('status_id', 'active')
->where( 'created_at', '>', Carbon::now()->subDays(30))
->get();