One initial gotcha that you'll encounter, when building your first Laravel app, is the need to always make some variable available to a view or view partial. Do you place the binding in your controller method? Well, what about every other route that loads the view? Certainly, the answer isn't to duplicate these bindings all over the place. Instead, we'll make use of view composers.
Published on Nov 11th, 2015.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.