Support the ongoing development of Laravel.io →
Eloquent Packages Architecture

Hi everyone,

What is your approach for repository methods responses ? returning Eloquent models or collections breaks the true Repsitory pattern.

I have created a package that uses debug_back_trace() to implement Friend classes approach in object oriented design :

Laravel Repository Response .

Whats your idea, is it incorrect or unncessacy ?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

reshadman reshadman Joined 15 Feb 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.

© 2025 Laravel.io - All rights reserved.