Carbon::now()->subDays(1)
$users = Users::where('status_id', 'active')
->where( 'created_at', '>', Carbon::now()->subDays(30))
->get();
date('Y-m-d 00:00:00', strtotime("-30 days");
$day = '2019-10-30 18:29:19';
$date = Carbon::createFromFormat('Y-m-d H:i:s', $day);
$date->subDay(); // Subtracts 1 day
echo $date->format('Y-m-d h:i:s');