Laravel -Untertage
$users = Users::where('status_id', 'active')
->where( 'created_at', '>', Carbon::now()->subDays(30))
->get();
Shadow
$users = Users::where('status_id', 'active')
->where( 'created_at', '>', Carbon::now()->subDays(30))
->get();
$dt =Carbon::now();
echo $dt->subDay(); // 2012-03-03 00:00:00
echo $dt->subDays(29);
$start_time = \Carbon\Carbon::parse($request->input('start_time'));
$finish_time = \Carbon\Carbon::parse($request->input('finish_time'));
$price = $request->input('price');
$result = $start_time->diffInDays($finish_time, false);
if ($result < 0) {
$price = $price * $result;
}