1 public function getFullNameAttribute()
2 {
3 return "{$this->first_name} {$this->last_name}";
4 }
5
6
7 $agents = User::whereId($agent->id)->get()->pluck('full_name', 'id');
8
9
10 $agents = json_decode(json_encode($agents), true);