I think it could make sense to rename your order_product table to item, so we can define a model for the pivot table with a meaningful name. Then you can define a one-to-one relationship between item and shipment.
We end up with the following relationships:
class Order extends Model
{
public function items()
{
return $this->hasMany(Item::class);
}
public function products()
{
return $this->belongsToMany(Product::class, 'item');
}
}
class Product extends Model
{
public function items()
{
return $this->hasMany(Item::class);
}
public function orders()
{
return $this->belongsToMany(Order::class, 'item');
}
}
class Item extends Model
{
public function order()
{
return $this->belongsTo(Order::class);
}
public function product()
{
return $this->belongsTo(Product::class);
}
public function shipment()
{
return $this->hasOne(Shipment::class);
}
}