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.
But in my understanding you can extract that 'like' feature to trait and then you can add that trait to any number of controllers.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community