https://laravel-news.com/eloquent-tips-tricks /** * @param Request $request * @param integer $bankId * @param datetime $from * @return \Illuminate\Http\JsonResponse */ public function getBankFilesUploadedFromMonth(Request $request, $bankId = null) { $fromMonth = $request->get('fromMonth', '01'); $fromYear = $request->get('fromYear', date('Y')); $account = $request->get('user'); try { if (!$account->isAdmin()) $bank = $account->bank; else $bank = $this->bankRepository->find($bankId, true); ...
Some tribes of the programmer clan.