How to make custom START DATE where begin from July not January.
This code return month as per january until december :
for ($i = 1; $i <= 12; $i++) {
$cashTransactions = $this->model->select('amount', 'paid_on')
->whereMonth('paid_on', "{$i}")
->whereYear('paid_on', date('Y'))
->sum('amount');
$results[$months[$i - 1]] = $cashTransactions;
}
I wanna make custom start date for that.
How to achieve that ?