Docs: https://laravel.com/docs/5.5/helpers#method-str-contains · The str_contains function determines if the given string contains the given value: · $contains = str_contains('This is my name', 'my'); · You may also pass an array of values to determine if the given string contains any of the values: · $contains = str_contains('This is my name', ['my', 'foo']); Answer from set0x on google.com
🌐
Google
google.com › goto
Strings | Laravel 13.x - The clean stack for Artisans and agents
Laravel includes a variety of functions for manipulating string values. Many of these functions are used by the framework itself; however, you are free to use them in your own applications if you find them convenient. __ class_basename e preg_replace_array Str::after Str::afterLast Str::apa Str::ascii Str::before Str::beforeLast Str::between Str::betweenFirst Str::camel Str::charAt Str::chopStart Str::chopEnd Str::contains Str::containsAll Str::doesntContain Str::doesntEndWith Str::doesntStartWith Str::deduplicate Str::endsWith Str::excerpt Str::finish Str::fromBase64 Str::headline Str::initia
🌐
Google
google.com › goto
PHP: str_contains - Manual
The polyfill that based on original work from the PHP Laravel framework had a different behavior; when the $needle is `""` or `null`: php8's will return `true`; but, laravel'str_contains will return `false`; when php8.1, null is deprecated, You can use `$needle ?: ""`; ... A couple of functions for checking if a string contains any of the strings in an array, or all of the strings in an array: <?php function str_contains_any(string $haystack, array $needles): bool { return array_reduce($needles, fn($a, $n) => $a || str_contains($haystack, $n), false); } function str_contains_all(string $haystack, array $needles): bool { return array_reduce($needles, fn($a, $n) => $a && str_contains($haystack, $n), true); } ?> str_contains_all() will return true if $needles is an empty array.
🌐
Google
google.com › goto
Laravel check if a string contains a word from db
September 13, 2021 - We cannot provide a description for this page right now
🌐
Google
google.com › goto
Helpers | Laravel 9.x - The clean stack for Artisans and agents
Laravel is a PHP web application framework with expressive, elegant syntax. We've already laid the foundation — freeing you to create without sweating the small things.
🌐
Google
google.com › home › blog › laravel › how to check if string contains specific word in php laravel
How To Check if String Contains Specific Word in PHP Laravel
May 11, 2022 - use Illuminate\Support\Str; $string = 'Laravel is the best PHP framework.'; if(Str::contains($string, ['framework', 'php'])) { echo 'true'; }
🌐
Google
google.com › goto
Laravel 12 introduces Rule::contains() for string validation | Jafar Madadi posted on the topic | LinkedIn
July 29, 2025 - New Validation in Laravel 12: Laravel 12 introduces a handy new validation rule: Rule::contains() – allowing you to validate if a string contains specific values with much more control and flexibility.
🌐
Google
google.com › goto
How to Check if String Contains Specific Word in Laravel? - ItSolutionstuff.com
April 16, 2024 - Laravel has a Str helper function. Str class has contains() method that will provide to check string contains in laravel application.
🌐
Google
google.com › goto
Laravel 5.5 String Helper Method: contains » Stillat
November 30, 2017 - The contains method in Laravel's Illuminate\Support\Str class allows you to check if any given elements exist within a string. By passing in a string and an array of elements, the method will return true if any of the elements are found in the ...
Find elsewhere
🌐
Nabilhassen
nabilhassen.com › search-for-a-string-inside-another-string-in-php
PHP: Check if a string contains a substring
November 13, 2025 - $haystack = "The quick brown fox jumps over the lazy dog"; ... str_contains() is the clearest and most modern solution for checking if string contains substring in PHP 8 and newer.
🌐
Laravel
laravel.com › docs › 11.x › validation
Validation | Laravel 11.x - The clean stack for Artisans and agents
Active URL Alpha Alpha Dash Alpha Numeric Ascii Confirmed Current Password Different Doesnt Start With Doesnt End With Email Ends With Enum Hex Color In IP Address JSON Lowercase MAC Address Max Min Not In Regular Expression Not Regular Expression Same Size Starts With String Uppercase URL ULID UUID · Between Decimal Different Digits Digits Between Greater Than Greater Than Or Equal Integer Less Than Less Than Or Equal Max Max Digits Min Min Digits Multiple Of Numeric Same Size · Array Between Contains Distinct In Array List Max Min Size
🌐
Flexiple
flexiple.com › php › php-string-contains
PHP String contains a Substring various methods - Flexiple
As stripos is case insensitive, it does not return a false when used to check if the PHP string contains the 'Top' substring. However, this is not the case when strpos or strrpos are used. Now, let's look at a case where the index is 0. $string = "Hire the top 1% freelance developers" $substring_index = stripos($string, "Hire"); if($substring_index != false) { echo "'Hire' is a substring"; } else { echo "'Hire' is not a substring"; } //Output = "'Hire' is not a substring" if($substring_index !== false) { echo "'Hire' is a substring"; } else { echo "'Hire' is not a substring"; } //Output = "'Hire' is a substring"
🌐
YouTube
youtube.com › watch
New in Laravel: String doesntContain() method
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
🌐
Educative
educative.io › home › courses › using laravel for advanced string manipulation in php › checking if a string contains multiple substrings
Checking If a String Contains Multiple Substrings
Learn how to use Laravel's containsAll method to verify if a string includes multiple substrings with case-sensitive or case-insensitive options.
🌐
Laravel
laravel.com › docs › 10.x › strings
Strings - Laravel 10.x - The PHP Framework For Web Artisans
September 11, 2023 - The Str::beforeLast method returns ... If the index is out of bounds, false is returned: ... The Str::contains method determines if the given string contains the given value....