[WIP] Finish the order process

This commit is contained in:
Ludovic CANDELLIER
2022-08-18 18:20:44 +02:00
parent d423fce4f5
commit c22b10dd10
28 changed files with 375 additions and 245 deletions

View File

@@ -9,7 +9,7 @@ class Delivery extends Model
protected $guarded = ['id'];
protected $table = 'shop_deliveries';
public function Customers()
public function customers()
{
return $this->hasMany(Customer::class);
}

View File

@@ -8,12 +8,12 @@ class Order extends Model
{
protected $guarded = ['id'];
public function Customer()
public function customer()
{
return $this->belongsTo(Customer::class);
}
public function Payments()
public function payments()
{
return $this->hasMany(OrderPayment::class);
}

View File

@@ -0,0 +1,15 @@
<?php
namespace App\Models\Shop;
use Illuminate\Database\Eloquent\Model;
class OrderDetail extends Model
{
protected $guarded = ['id'];
public function order()
{
return $this->belongsTo(Order::class);
}
}

View File

@@ -8,7 +8,7 @@ class OrderPayment extends Model
{
protected $guarded = ['id'];
public function Order()
public function order()
{
return $this->belongsTo(Order::class);
}