25 lines
475 B
PHP
25 lines
475 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Rule extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'rule';
|
|
protected $fillable = ['id_penyakit', 'id_gejala'];
|
|
|
|
public function penyakit()
|
|
{
|
|
return $this->belongsTo(Penyakit::class, 'id_penyakit');
|
|
}
|
|
|
|
public function gejala()
|
|
{
|
|
return $this->belongsTo(Gejala::class, 'id_gejala');
|
|
}
|
|
}
|