Skip to content

Commit

Permalink
Fixed issue where boolean examples weren't shown properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Hijmans committed Nov 22, 2022
1 parent 6c17082 commit 94f278d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions resources/views/components/field-details.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@
@endif
<br>
@php
if($example !== null && $example !== '' && !is_array($example)) {
$exampleAsString = $example === false ? "false" : $example;
$description .= " Example: `$example`";
if($example !== null && $example !== '' && !is_array($example)) {
$exampleAsString = $example;
if (is_bool($example)) {
$exampleAsString = $example ? "true" : "false";
}
$description .= " Example: `$exampleAsString`";
}
@endphp
{!! Parsedown::instance()->text(trim($description)) !!}

0 comments on commit 94f278d

Please sign in to comment.