PHP code example of bipinkareparambil / laravel-where-like-any
1. Go to this page and download the library: Download bipinkareparambil/laravel-where-like-any library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bipinkareparambil / laravel-where-like-any example snippets
// Match any pattern
User::whereLikeAny('name', ['%john%', '%jane%'])->get();
// Match all patterns
User::whereLikeAll('bio', ['%laravel%', '%php%'])->get();
// Exclude any pattern
User::whereNotLikeAny('email', ['%spam%', '%temp%'])->get();
// Case-sensitive on MySQL
User::whereLikeAny('name', ['%John%'], caseSensitive: true)->get();