Current File : //proc/thread-self/root/proc/self/root/home/tradevaly/www/app/Models/OrderItem.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\SoftDeletes;

class OrderItem extends Model
{
    use HasFactory;
    public function product(){
        return $this->belongsTo(Product::class, 'product_id', 'id');
    }
    public function order(){
        return $this->belongsTo(Order::class, 'order_id', 'Order_id');
    }
}