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

In laravel you can make classes anywhere. I actually don't have a problem with controllers collecting things and putting things together for display, but if you find yourself do that so much that you need to reuse something of that logic then yeah you need another layer. I would look into something like the Decorator Pattern.

0

A decorator pattern may be what you're looking for. This was a nice package https://github.com/robclancy/presenter i'm not sure if it supports L5

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jegra jegra Joined 19 Jan 2015

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.