Answers for "how to pluck fullname database laravel"

PHP
0

how to pluck fullname database laravel

public function getFullNameAttribute()
    {
        return "{$this->first_name} {$this->last_name}";
    }
  

      $agents = User::whereId($agent->id)->get()->pluck('full_name', 'id');


      $agents = json_decode(json_encode($agents), true);
Posted by: Guest on May-24-2020

Browse Popular Code Answers by Language