24 lines
514 B
PHP
24 lines
514 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class SubKategori extends Model
|
|
{
|
|
use HasFactory; use SoftDeletes;
|
|
|
|
protected $table = 'SubKategori';
|
|
|
|
protected $primaryKey = 'SubKategoriId';
|
|
|
|
protected $fillable = ['KategoriId', 'NamaSubKategori'];
|
|
|
|
public function kategori()
|
|
{
|
|
return $this->belongsTo(Kategori::class, 'KategoriId', 'KategoriId');
|
|
}
|
|
}
|