@foreach loop in Laravel 4 -


anyone see reasons why wouldn't work in laravel 4? figured check here before posting on github.

in controller:

return view::make('home.index') ->with('bcrumbs', array("home.index" => "home","home.privacy" =>"privacy policy")) 

in template:

@foreach ($bcrumbs $k => $elem}   <li><a href='{{ url::route($k) }}'>{{ $elem }}</a></li> @endforeach 

even if remove processing within foreach , write "hi", total failure. chrome reports:

error 324 (net::err_empty_response): server closed connection without sending data. 

i don't know if it's intentional, have mis-matched braces: @foreach ($bcrumbs $k => $elem}: you're opening ( , (not) closing } … maybe that's it!


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -