I have something like this in my Items model
public function orders()
{
return $this->belongsToMany(Items::class, 'item_orders', 'item_id', 'order_id')
->wherePivotNull('deleted_at'); // It is necessary to remove softdeletes in belongsToMany
}