Skip to content

Instantly share code, notes, and snippets.

@HelgeSverre
Created June 9, 2023 17:52
Show Gist options
  • Save HelgeSverre/9803bb324177ebd166d229c75ab10a4a to your computer and use it in GitHub Desktop.
Save HelgeSverre/9803bb324177ebd166d229c75ab10a4a to your computer and use it in GitHub Desktop.
Blade formatter bug
<div>
@if ($data['nextInspection'])
<div
class="text-gray inline-flex items-baseline text-base font-semibold"
>
@if ($data['nextInspection']->isToday())
Your inspection is today!
@else
<span class="mr-2 text-xs font-medium text-gray-700">
{{ $data['nextInspection']->diffForhumans() }}
</span>
<span class="text-base font-semibold text-gray-900">
{{ $data['nextInspection']->format('d.m.Y') }}
</span>
@endif
</div>
@endif
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment