Support the ongoing development of Laravel.io →
posted 8 years ago
Views Blade
Last updated 1 year ago.
0

If you don't like injecting it, there are also view composers and view shares.

http://laravel.com/docs/5.1/views#view-composers

http://laravel.com/docs/5.1/views#sharing-data-with-all-views

0

The approach I usually go for would be to make a separate file for the menu only and include it in your layout/pages with @include. Then make a view composer like thomastkim suggested, for the menu file to pass through any data you may need in it.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Nerfair nerfair Joined 16 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.