12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Relations\HasOne;
- use Illuminate\Support\Collection;
- # use Illuminate\Database\Eloquent\Model;
- class BillingReport extends Model
- {
- protected $table = 'billing_report';
- public function clientDisplayName()
- {
- return $this->client_last . ', ' . $this->client_first;
- }
- public function proDisplayName()
- {
- return $this->pro_last . ', ' . $this->pro_first;
- }
- public function note()
- {
- return $this->hasOne(Note::class, 'id', 'note_id');
- }
- public function client()
- {
- return $this->hasOne(Client::class, 'id', 'client_id');
- }
- }
|