first commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Verifikator;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class JabatanTugasTambahan extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'verifikator.jabatan_tugas_tambahans';
|
||||
protected $with = ['detail'];
|
||||
protected $fillable = ['id', 'nama', 'jenis_pegawai_id'];
|
||||
|
||||
function details()
|
||||
{
|
||||
return $this->hasMany(JabatanTugasTambahanRiwayat::class, 'jtt_id', 'id');
|
||||
}
|
||||
|
||||
function detail()
|
||||
{
|
||||
return $this->hasOne(JabatanTugasTambahanRiwayat::class, 'jtt_id', 'id')->where('periode', 377);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user