From b37db6e39d0d3fc5fb0de7740f1fc1077b7eb75c Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Sun, 27 Aug 2017 12:05:07 +0800 Subject: [PATCH] Added male and female code based on selected lang --- app/User.php | 2 +- resources/lang/en/app.php | 2 ++ resources/lang/id/app.php | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/User.php b/app/User.php index 4134be2..4f2b0fc 100644 --- a/app/User.php +++ b/app/User.php @@ -37,7 +37,7 @@ class User extends Authenticatable public function getGenderAttribute() { - return $this->gender_id == 1 ? 'L' : 'P'; + return $this->gender_id == 1 ? trans('app.male_code') : trans('app.female_code'); } public function setFather(User $father) diff --git a/resources/lang/en/app.php b/resources/lang/en/app.php index bf62dd2..c4a08c2 100644 --- a/resources/lang/en/app.php +++ b/resources/lang/en/app.php @@ -7,6 +7,8 @@ return [ 'unknown' => 'Unknown', 'male' => 'Male', 'female' => 'Female', + 'male_code' => 'M', + 'female_code' => 'F', 'family_chart' => 'Family Chart', 'family_tree' => 'Family Tree', 'child_count' => 'Child Count', diff --git a/resources/lang/id/app.php b/resources/lang/id/app.php index 3ac20ea..f32f114 100644 --- a/resources/lang/id/app.php +++ b/resources/lang/id/app.php @@ -7,6 +7,8 @@ return [ 'unknown' => 'Tidak diketahui', 'male' => 'Laki-laki', 'female' => 'Perempuan', + 'male_code' => 'L', + 'female_code' => 'P', 'family_chart' => 'Bagan Keluarga', 'family_tree' => 'Pohon Keluarga', 'child_count' => 'Jumlah Anak',