Question and answer is powered by AnsPress.io
I am using laravel latest version and I want to get the result from the database where(‘id’,’1,2,3’). How can I do that?
In that type of case use whereIn-
$userIds = [1, 2, 3]; $friend = User::whereIn('id', $userIds)->get();