diff --git a/app/Jobs/CalcModule.php b/app/Jobs/CalcModule.php index 55d575d..7e9e7d0 100644 --- a/app/Jobs/CalcModule.php +++ b/app/Jobs/CalcModule.php @@ -32,9 +32,7 @@ public function handle() // end of this month $endOfMonth = now()->endOfMonth(); - $moduleController = new ModuleController(); - - Module::chunk(100, function ($modules) use ($moduleController, $beginOfMonth, $endOfMonth) { + Module::chunk(100, function ($modules) use ($beginOfMonth, $endOfMonth) { foreach ($modules as $module) { $this_month = Transaction::where('module_id', $module->id)->where('type', 'payout')->whereBetween('created_at', [$beginOfMonth, $endOfMonth]);