private function addDepartmentLangs(Requests\DepartmentRequest $request, Department $department) { $langs = []; foreach (LaravelLocalization::getSupportedLocales() as $short => $locale) { $langs[] = ['lang_id' => dbTrans($short), 'name' => $request->get('name_' . $short), 'title' => $request->get('title_' . $short), 'description' => $request->get('description_' . $short)]; } $department->langs()->createMany($langs); }