Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

using where like in laravel 8

/**
* filter the user result
*
* @var array
*/
public function users()
{
    $search = "United States";
    
    $users = User::where('country', 'LIKE', '%'.$search.'%')
        ->get();

    dd($users);
}
Source by www.laravelcode.com #
 
PREVIOUS NEXT
Tagged: #laravel
ADD COMMENT
Topic
Name
5+6 =