php - dd() reads values that var_dump() can't read -


in 1 of controllers call view variable $members:

$members = member::orderby("created_at", "desc")->get(); 

then in view loop on member's groups:

@foreach ($members $group)     <?php $group = $group->group(); ?>     <b>{{ $group->title }}</b> // fails @endforeach 

this throws trying property of non-object exception. if do

@foreach ($member $group)     <?php $group = $group->group(); ?>     <?php dd($group); ?>       // works     <b>{{ $group->title }}</b> // fails @endforeach 

i can see attributes array populated values want. why can dd() read values can't read using {{ $var }}?


@foreach ($member $group)     <?php $group = $group->group(); ?>     <?php var_dump($group); ?> // fails     <b>{{ $group->title }}</b> // fails @endforeach 

fails well.

i think found error. reason cannot read $group->value, $group["value"] works. may group keyword.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -