MsKategori.php 584 Bytes
Newer Older
Triyah Fatmawati committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php

namespace App\Models\Admin;

use App\Traits\Uuid;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class MsKategori extends Model
{
    use HasFactory;
    use Uuid;

    public $incrementing = false;
    protected $table = 'ms_kategori';
    protected $keyType = 'string';

    protected $fillable = [
        'id',
        'kode_kategori',
        'nama_kategori',
        'poin_saku',
        'status'
    ];
Triyah Fatmawati committed
25 26 27 28

    public function rKategori(){
        return $this->belongsToMany(Pengajuan::class, 'id', 'id_kategori');
    }
Triyah Fatmawati committed
29
}