I have an array
$user_lgas = ['lga1', 'lga2', 'lga3', ...];
I want to write a scopeSearch to get records base on user lgas something like
$query->where('lga', $user_lgas[0])->orWhere('lga', $user_lgas[1])->orWhere('lga', $user_lgas[2]) ...
I want to generate this query dynamically from the array, but the logic is kind of complicated for me. Please any Help