Laravel Tips – Creating a global model variable for all Blade Views

Interested in Laravel Nova? Check out my new course pre-launch at www.masteringnova.com!

Welcome to the new series in Laraning called Tips and Tricks! In this first video we will learn how to create a global $model variable accessible in all your Blade views that will have the Model that you want to implicitly bind. Meaning, you don’t need anymore to pass the model to your views via the Controller but use this $model directly in the Blade view without being returned by any Controller!

Source: https://www.youtube.com/watch?v=C23dJT1PeiE

Leave a Reply

Your email address will not be published. Required fields are marked *