-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Closed
Description
Currently you can define a class as a View Composer, the problem is you can only define one class per View Composer wich clutters quickly the application with one-method files.
If would be great if you could have one class for several View Composers and then instead of having a generic compose method you could do that, just like with routes and controllers :
View::composer('myview', 'ViewComposer@myComposerMethod')Or maybe (but that's unlikely) something that automatically parses which view to compose from the method :
View::composer('ViewComposer')
class ViewComposer
{
public function composeView($event); // Composes the "view" View
public function composeAnotherView($event) // Composes the "another.view" view
}Metadata
Metadata
Assignees
Labels
No labels