Support the ongoing development of Laravel.io →
Architecture
Last updated 3 months ago.
0

You could create 3 separate interfaces, which a single repository could use.

Split things into logical groups:

  • Client
  • Pet
  • Invoice

Or create separate repositories, each with it's own interface.

0

Thanks Jay.

My only question then becomes, are model relationships unnecessary? For example, my getPets() method simply creates a Client model and then uses the defined relationship to get the pets with $client->pets.

I figured a getPets() method in a PetsRepoInterface would return all pets, not client specific.

0

Sign in to participate in this thread!

LoadForge

Your banner here too?

unohuim unohuim unohuim Joined 1 Sep 2014

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.