src/Models/Contact.php
public function getFullNameAttribute()
    {
        $names = [];
        $names[] = $this->first_name  ?: '';
        $names[] = $this->middle_name ?: '';
        $names[] = $this->last_name   ?: '';

        return trim(implode(' ', array_filter($names)));
    }
public function getFullNameAttribute()
    {
        $names = [];
        $names[] = $this->first_name  ?: '';
        $names[] = $this->middle_name ?: '';
        $names[] = $this->last_name   ?: '';

        return trim(implode(' ', array_filter($names)));
    }
public function getFullNameAttribute ( ) { $ names = [ ] ; $ names [ ] = $ this -> first_name ? : '' ; $ names [ ] = $ this -> middle_name ? : '' ; $ names [ ] = $ this -> last_name ? : '' ; return trim ( implode ( ' ' , array_filter ( $ names ) ) ) ; }
Get the contacts full name.

@return string
Get the contacts full name .