Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

where like laravel

User::query()
   ->where('name', 'LIKE', "%{$searchTerm}%") 
   ->orWhere('email', 'LIKE', "%{$searchTerm}%") 
   ->get();

reference:
https://freek.dev/1182-searching-models-using-a-where-like-query-in-laravel
 
PREVIOUS NEXT
Tagged: #laravel
ADD COMMENT
Topic
Name
7+1 =