Yes, that's what you should always do anyways.
Try something like:
$data['brands'] = $this->brands;
return View::make('form')->with('brands', $data['brands']);
Issue now is, you're sending through $data
and it has no idea where you're plucking $brands
from. Not sure if this will work, haven't tested, but in your blade {{ $data->brands }}
may work, not sure though.
Also to make it more readable in blade, instead of using isset()
, you can do:
{{{ $name or 'Default' }}}
as per the docs.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community