@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
Post a Comment