Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

secondman's avatar

Date Formatting in Blade Templates

The following is throwing a parse error in my subscription.blade.php file:

@if ($user->subscription_ends_at)
<td>{{ $user->subscription_ends_at->toDayDateTimeString() }}</td>
@endif 

I have added the subscription_end_at column to the $dates property so I am getting a Carbon instance, but for some reason Blade doesn't seem to like this. Or more likely I'm doing something incorrectly.

My error looks like this:

FatalErrorException in fcd769bf0e6c07b882c608eb7d899b17 line 79: syntax error, unexpected '}'

Thanks.

0 likes
1 reply
secondman's avatar
secondman
OP
Best Answer
Level 17

Nevermind, I found the error. I wish there was a way to delete these.

Please or to participate in this conversation.