33 lines
633 B
PHP
33 lines
633 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Notifications\Notifiable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class LaporanPenjualan extends Model
|
|
{
|
|
|
|
use HasFactory, Notifiable;
|
|
protected $table = 'laporan_penjualan';
|
|
protected $fillable = [
|
|
'tanggal',
|
|
'nama_pembeli',
|
|
'alamat',
|
|
'no_telepon',
|
|
'nama_produk',
|
|
'harga_beli',
|
|
'harga_jual',
|
|
'jumlah',
|
|
'total',
|
|
'id_product'
|
|
];
|
|
|
|
|
|
public function product()
|
|
{
|
|
return $this->belongsTo(Product::class, 'id_product');
|
|
}
|
|
}
|