motherTongue = $motherTongue; } /** * @return array */ public function getMotherTongueList() { $response = []; try { $user = loggedInUser(); $data = $this->motherTongue->get()->toArray(); if ($user && $data) { $response['data'] = $data; $response['status'] = Constant::CODE_200; } else { $response['data'] = []; $response['status'] = Constant::CODE_401; } } catch (\Exception $ex) { Log::error($ex); $response['message'] = trans('auth.something_went_wrong'); $response['status'] = Constant::CODE_403; } return $response; } }