You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting TypeError when I using sample code in BREAD.
count(): Argument #1 ($var) must be of type Countable|array, stdClass given (View: /var/www/html/vendor/tcg/voyager/resources/views/bread/browse.blade.php
)
Steps to reproduce
Put the sample code in BREAD { "options": { "checkbox1": "Checkbox 1 Text", "checkbox2": "Checkbox 2 Text" } }
Expected behavior
fix it as below. add true into json_decode
file : tcg/voyager/sources/views/bread/browse.blade.php line 148 and line 149
@if (@count(json_decode($data->{$row->field}, true)) > 0)
@foreach(json_decode($data->{$row->field}, true) as $item)
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Laravel version
8.53.1
PHP version
8.0.9
Voyager version
1.5.1
Database
5.6
Description
Getting TypeError when I using sample code in BREAD.
count(): Argument #1 ($var) must be of type Countable|array, stdClass given (View: /var/www/html/vendor/tcg/voyager/resources/views/bread/browse.blade.php
)
Steps to reproduce
Put the sample code in BREAD
{ "options": { "checkbox1": "Checkbox 1 Text", "checkbox2": "Checkbox 2 Text" } }
Expected behavior
fix it as below. add
true
into json_decodefile :
tcg/voyager/sources/views/bread/browse.blade.php
line 148 and line 149Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: