Appointment.php 345 B

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