12345678910111213141516171819202122232425 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Relations\HasOne;
- # use Illuminate\Database\Eloquent\Model;
- class Client extends Model
- {
- protected $table = 'client';
- public function displayName(){
- return $this->name_last . ', '. $this->name_first;
- }
- public function mcp(){
- return $this->hasOne(Pro::class, 'id', 'mcp_pro_id');
- }
- public function cm(){
- return $this->hasOne(Pro::class, 'id', 'cm_pro_id');
- }
- }
|