26 lines
504 B
PHP
26 lines
504 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PatientPlan extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $table = 'patient_plan';
|
|
protected $fillable = [
|
|
'patient_id',
|
|
'plan_id'
|
|
];
|
|
|
|
public function patient()
|
|
{
|
|
return $this->belongsTo(Patient::class, 'patient_id', 'id');
|
|
}
|
|
public function plan()
|
|
{
|
|
return $this->belongsTo(Plan::class, 'plan_id');
|
|
}
|
|
}
|