Konferensi.php 651 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?php

namespace App\Models;

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

class Konferensi extends Model
{
    use HasFactory;
    use Uuid;

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

    protected $fillable = [
        'id',
Siti Aisah committed
20 21
        'nama',
        'harga'
22 23 24 25 26
    ];

    public function rKonferensi() {
        return $this->belongsToMany(Registrasi::class, 'id_konferensi', 'id');
    }
27 28 29 30

    public function pkKonferensiPeserta() {
        return $this->hasMany(Konferensi::class, 'id_konferensi', 'id');
    }
31
}