Laravel Les relations se transforment

        $product = ProductModel::query()->findOrFail($id);
        $product_manufacturer = $product->manufacturer;
        $product_supplier = $product->supplier;
        $product_category = $product->categories->map(function ($category) {
            return new CategoryViewModel($category);
        });
Shadow