Support the ongoing development of Laravel.io →
Architecture
Last updated 2 years ago.
0

Also, If different product types have different attributes, how should my repository create function prepare the product details to be sent for persistence?

class ProductRepository
{
    // other methods

    public function create($details) {
        // PROBLEM:
        // How should I handle the preparation of data to be sent for saving
        // since different product types have different attributes

        $this->productService->create($data);
    }
}
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.