Support the ongoing development of →
posted 9 years ago
Last updated 2 years ago.

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.


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.


Sign in to participate in this thread!


Your banner here too?

unohuim unohuim Joined 1 Sep 2014


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.

© 2024 - All rights reserved.