Please tell me what is the equivalent of following command in Blade
if (strpos($a,'are') !== false) {
echo 'true';
}
Please tell me what is the equivalent of following command in Blade
if (strpos($a,'are') !== false) {
echo 'true';
}
If you're looking for the existence of a substring within a string then str_contains() is what you're looking for Laravel Helper Methods
If you want to use with blade then.
@if(strpos($a,'are') !== false)
// do stuff
@endif