I have to place some PHP code inside a Laravel 5 blade template. Like below
@foreach ($farmer->tasks as $task) @if ($task->pivot->due_at) < da
In modern Laravel (6/7) you should do this:
@php yourphpcode(); @endphp