ECOMMERCE/app/Models/PosInvoiceVoucher.php

30 lines
557 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class PosInvoiceVoucher extends Model
{
use HasFactory;
protected $table = 'pos_invoice_vouchers';
protected $fillable = [
'pos_invoice_id',
'voucher_id',
'nominal'
];
public function invoice()
{
return $this->belongsTo(PosInvoice::class, 'pos_invoice_id');
}
public function voucher()
{
return $this->belongsTo(Voucher::class, 'voucher_id');
}
}