31 lines
632 B
PHP
31 lines
632 B
PHP
<?php
|
|
|
|
namespace App\Models\Verifikator;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Honorer extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'verifikator.honorers';
|
|
protected $guarded = [];
|
|
|
|
|
|
function absen()
|
|
{
|
|
return $this->hasMany(PengajuanPresensi::class, 'nip', 'nip')->where('tipe', 'absen');
|
|
}
|
|
|
|
function cuti()
|
|
{
|
|
return $this->hasMany(PengajuanPresensi::class, 'nip', 'nip')->where('tipe', 'cuti');
|
|
}
|
|
|
|
function unit()
|
|
{
|
|
return $this->belongsTo(UnitKerjaPegawai::class, 'unit_id', 'id');
|
|
}
|
|
}
|