String berisi string Laravel
// **** 1
$str = "Hello World!";
// String contains the given value
$contains = str_contains($str, 'World');
// Array of values
$contains = str_contains($str, ['Hi', 'World']);
// **** 2
use Illuminate\Support\Str;
$str = "Hello World!";
$contains = Str::contains($str, 'World');
Snippets