Model : keuangan
user_3285855
php
2 years ago
592 B
7
Indexable
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Keuangan extends Model
{
use HasFactory;
protected $table = 'keuangan';
protected $fillable = [
'id_kategori',
'id_pengguna',
'jumlah',
'tanggal',
'deskripsi',
'jenis',
];
public function kategori()
{
return $this->hasOne(Kategori::class, 'id', 'id_kategori');
}
public function pengguna()
{
return $this->hasOne(User::class, 'id', 'id_pengguna');
}
}
Editor is loading...
Leave a Comment