Files
opensem/app/Models/Shop/InvoicePayment.php
2022-08-19 22:04:44 +02:00

22 lines
418 B
PHP

<?php
namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model;
class InvoicePayment extends Model
{
protected $guarded = ['id'];
protected $table = 'shop_invoice_payments';
public function invoice()
{
return $this->belongsTo(Invoice::class);
}
public function scopeByInvoice($query, $invoice_id)
{
return $query->where('invoice_id', $invoice_id);
}
}