This commit is contained in:
Mekan1206
2026-04-29 22:26:04 +05:00
parent 9b95087b94
commit dd633ef7da
19 changed files with 314 additions and 35 deletions

View File

@@ -12,6 +12,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use App\Models\Ecommerce\Product\Order\Shipping\OrderShippingMethod;
use Illuminate\Database\Eloquent\SoftDeletes;
class Order extends Model
@@ -31,6 +32,7 @@ class Order extends Model
'number',
'status',
'shipping_method',
'shipping_method_id',
'shipping_price',
'payment_type_id',
'notes',
@@ -85,4 +87,12 @@ class Order extends Model
{
return $this->belongsTo(PaymentType::class, 'payment_type_id');
}
/**
* Shipping method
*/
public function shippingMethod(): BelongsTo
{
return $this->belongsTo(OrderShippingMethod::class, 'shipping_method_id');
}
}