32 lines
646 B
PHP
32 lines
646 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class datasubkriteria extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'datasubkriterias';
|
|
protected $primaryKey = 'id_subkriteria';
|
|
|
|
protected $fillable = [
|
|
'id_kriteria',
|
|
'kode_subkriteria',
|
|
'nama_subkriteria',
|
|
'nilai bobot',
|
|
|
|
];
|
|
protected $with = ['datakriteria'];
|
|
|
|
public function datakriteria():BelongsTo{
|
|
return $this->belongsTo(datakriteria::class, 'id_kriteria');
|
|
}
|
|
|
|
|
|
|
|
}
|