Answers for "laravel get last month records"

PHP
0

laravel get last month records

$fromDate = Carbon::now()->subMonth()->startOfMonth()->toDateString();
$tillDate = Carbon::now()->subMonth()->endOfMonth()->toDateString();

$revenueLastMonth = Callback::whereBetween('created_at',[$fromDate,$tillDate])->get();
Posted by: Guest on March-02-2021

Code answers related to "laravel get last month records"

Browse Popular Code Answers by Language