Total Complexity | 5 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class UserCustomerRecent extends Model |
||
9 | { |
||
10 | use HasFactory; |
||
11 | |||
12 | protected $guarded = ['id', 'updated_at', 'created_at']; |
||
13 | protected $hidden = ['id', 'user_id', 'created_at', 'Customer']; |
||
14 | protected $appends = ['name', 'slug']; |
||
15 | |||
16 | public function Customer() |
||
19 | } |
||
20 | |||
21 | public function getNameAttribute() |
||
22 | { |
||
23 | return isset($this->Customer->name) ? $this->Customer->name : null; |
||
24 | } |
||
25 | |||
26 | public function getSlugAttribute() |
||
29 | } |
||
30 | } |
||
31 |