I have solved this by following this excellent tutorial
https://scotch.io/tutorials/sharing-data-between-views-using-laravel-view-composers
if pulling data from the db you can add the view composer to the boot method on the ComposerServiceMethod
View::composer('*', function($view)
{
$view->with('categories', Categories::where('parent_id',NULL)->orderBy('id')->get());
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community