Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #month #records
ADD COMMENT
Topic
Name
6+9 =