Appointment.php 394 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Relations\HasOne;
  4. # use Illuminate\Database\Eloquent\Model;
  5. class Appointment extends Model
  6. {
  7. protected $table = 'appointment';
  8. public function client() {
  9. return $this->hasOne(Client::class, 'id', 'client_id');
  10. }
  11. public function pro() {
  12. return $this->hasOne(Pro::class, 'id', 'pro_id');
  13. }
  14. }