[WIP] Working on orders & invoices
This commit is contained in:
21
app/Models/Shop/InvoicePayment.php
Normal file
21
app/Models/Shop/InvoicePayment.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user