Update Fix
This commit is contained in:
25
app/Models/Voucher.php
Normal file
25
app/Models/Voucher.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Voucher extends Model
|
||||
{
|
||||
protected $table = 'vouchers';
|
||||
|
||||
protected $fillable = [
|
||||
'pegawai_id',
|
||||
'kode',
|
||||
'saldo',
|
||||
'aktif',
|
||||
'catatan',
|
||||
'created_by',
|
||||
];
|
||||
|
||||
public function pegawai(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Pegawai::class, 'pegawai_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user