2018-11-02 21:54:46 +11:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models\Presenters;
|
|
|
|
|
|
2019-01-27 10:22:57 +11:00
|
|
|
/**
|
|
|
|
|
* Class ClientPresenter
|
|
|
|
|
* @package App\Models\Presenters
|
|
|
|
|
*/
|
2018-11-02 21:54:46 +11:00
|
|
|
class ClientPresenter extends EntityPresenter
|
|
|
|
|
{
|
|
|
|
|
|
2019-01-27 10:22:57 +11:00
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
2018-11-07 16:22:36 +11:00
|
|
|
public function name()
|
|
|
|
|
{
|
|
|
|
|
return $this->entity->name ?: $this->entity->primary_contact->first()->first_name . ' '. $this->entity->primary_contact->first()->last_name;
|
|
|
|
|
}
|
2018-11-02 21:54:46 +11:00
|
|
|
}
|