public function getFullNameAttribute()
    {
        $names = array_filter([
            $this->first_name,
            $this->middle_name,
            $this->last_name,
        ]);

        if (empty($names)) {
            return null;
        }

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

        if (empty($names)) {
            return null;
        }

        return implode(' ', $names);
    }
public function getFullNameAttribute ( ) { $ names = array_filter ( [ $ this -> first_name , $ this -> middle_name , $ this -> last_name , ] ) ; if ( empty ( $ names ) ) { return null ; } return implode ( ' ' , $ names ) ; }
Get the user's full name based on the available names.

@return string
Get the user s full name based on the available names .