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

Sounds to me like you are talking about Traits. I'm currently reading about this new feature to php>=5.4, so i can point you to couple resources, but i can't give you code that will solve your problem.

Blog post 1

PHP Site

But in my understanding you can extract that 'like' feature to trait and then you can add that trait to any number of controllers.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.