Support the ongoing development of Laravel.io →
Views Forms
Last updated 2 years ago.
0

You will need to pass the data with the include for the partial to use the data,

@include('layouts.role', array('admin'=>$admin, 'group_super_user'=>$group_super_user,'user'=>$user))
Last updated 2 years ago.
0

Apparently I can't edit the previous post ....

I actually read your post wrong.

I don't think you can set a variable in the partial and have it be passed back to the parent.

Last updated 2 years ago.
0
Solution

You should probably set these variables in a controller or view composer and pass them along to the appropriate views.

View::share() could solve that. http://laravel.com/docs/4.2/responses#views

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

ahmadina ahmadina Joined 6 Mar 2014

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.