I like the repository pattern, decouple the controller from the model. Plenty of stuff if you google around but a matter of personal choice. If you are on a personal learning curve it is well worth a gander.
Thanks !
I know the above pattern but can not figure out how to pass multiple values to a view of different models, without soiling the controller :(
Like jacksoncharles said, use a repository to hide the logic. You could relate the models, load them all or just change the table on a single model and get all your data as a single array. You can then pass the result to the view without hard coding any var names.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community