[WIP] Finish the order process
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
15
app/Models/Shop/OrderDetail.php
Normal file
15
app/Models/Shop/OrderDetail.php
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ class OrderPayment extends Model
|
||||
{
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function Order()
|
||||
public function order()
|
||||
{
|
||||
return $this->belongsTo(Order::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user