Level 75
https://www.php.net/manual/en/function.is-numeric.php
Returns true if value is a number or a numeric string, false otherwise.
If duration is for example number of days then
{{ $a->created_at->addDays($a->duration)->diffForHumans() }}
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a question guys. How to deal with this code?
{{ is_numeric($a->duration) - \Carbon\Carbon::parse($a->created_at)->diffForHumans() }} days leftPlease or to participate in this conversation.