PatientRequest.php 469 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Models;
  3. # use Illuminate\Database\Eloquent\Model;
  4. class PatientRequest extends Model
  5. {
  6. protected $table = 'patient_request';
  7. public function client() {
  8. return $this->hasOne(Client::class, 'id', 'client_id');
  9. }
  10. public function customer() {
  11. return $this->hasOne(Customer::class, 'id', 'customer_id');
  12. }
  13. public function invoice() {
  14. return $this->hasOne(Invoice::class, 'id', 'invoice_id');
  15. }
  16. }