瀏覽代碼

fix: user model and customer model

Muhammad Iqbal Afandi 3 年之前
父節點
當前提交
1ff55def88
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      app/Models/Customer.php
  2. 1
    1
      app/Models/User.php

+ 1
- 1
app/Models/Customer.php 查看文件

21
     protected function gender(): Attribute
21
     protected function gender(): Attribute
22
     {
22
     {
23
         return Attribute::make(
23
         return Attribute::make(
24
-            get:fn($value) => $value === 1 ? __('words.female') : __('words.male'),
24
+            get:fn($value) => $value == 1 ? __('words.female') : __('words.male'),
25
         );
25
         );
26
     }
26
     }
27
 
27
 

+ 1
- 1
app/Models/User.php 查看文件

52
     protected function gender(): Attribute
52
     protected function gender(): Attribute
53
     {
53
     {
54
         return Attribute::make(
54
         return Attribute::make(
55
-            get:fn($value) => $value === 1 ? __('words.female') : __('words.male'),
55
+            get:fn($value) => $value == 1 ? __('words.female') : __('words.male'),
56
         );
56
         );
57
     }
57
     }
58
 
58