first commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user