Support the ongoing development of Laravel.io →
posted 9 years ago
Architecture
Last updated 2 years 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!

Eventy

Your banner here too?

unohuim unohuim Joined 1 Sep 2014

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.