[WIP] Working on orders & invoices

This commit is contained in:
Ludovic CANDELLIER
2022-08-19 22:04:44 +02:00
parent 1880b25407
commit dae8156164
32 changed files with 440 additions and 323 deletions

View 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);
}
}