25 lines
412 B
PHP
25 lines
412 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use App\Models\Produk;
|
|
|
|
class PenjualanBarang extends Model
|
|
{
|
|
protected $table = 'penjualan_barang';
|
|
|
|
protected $fillable = [
|
|
'penjualan_id',
|
|
'produk_id',
|
|
'jumlah',
|
|
'harga',
|
|
'total'
|
|
];
|
|
|
|
public function produk()
|
|
{
|
|
return $this->belongsTo(Produk::class, 'produk_id');
|
|
}
|
|
}
|