Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $revenueMonth = Callback::where('created_at', '>=', Carbon::today()->startOfMonth()->subMonth())->sum('payment');
- $revenueMonth = Callback::whereMonth(
- 'created_at', '=', Carbon::now()->subMonth()->month
- );
- $revenueMonth = Callback::where(
- 'created_at', '>=', Carbon::now()->subDays(30)->toDateTimeString()
- );
- $revenueMonth = Callback::where(
- 'created_at', '>=', Carbon::now()->firstOfMonth()->toDateTimeString()
- );
- $revenueMonth = Callback::where(
- 'created_at', '>=', Carbon::now()->startOfMonth()->subMonth()->toDateString()
- );
- $revenueMonth = Callback::where(
- 'created_at', '>=', Carbon::now()->subMonth()->toDateTimeString()
- );
- $fromDate = Carbon::now()->subMonth()->startOfMonth()->toDateString();
- $tillDate = Carbon::now()->subMonth()->endOfMonth()->toDateString();
- $revenueLastMonth = Callback::whereBetween(DB::raw('date(created_at)'), [$fromDate, $tillDate])->get();
- 2017-09-07 09:46:43
- 2017-09-07 09:46:43
- 2017-09-07 09:46:43
- 2017-09-02 09:46:43
- 2017-08-07 09:46:43
- $fromDate = Carbon::now()->subMonth()->startOfMonth()->toDateString();
- $tillDate = Carbon::now()->subMonth()->endOfMonth()->toDateString();
- $revenueLastMonth = Callback::whereBetween('created_at',[$fromDate,$tillDate])->get();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement