I am fetching locations from the database. I have code in the controller like this:
public function getLocationsList(Request $request,$searchKey)
{
$searchedLocations = Hotel::where('location', 'LIKE', "%$searchKey%")->get();
return $searchedLocations;
}
I can't understand $searchedLocations
is empty when I have a record in the database.
I am using VueJs and axios to send requests.
Please help.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2HRSbrB
via IFTTT
Aucun commentaire:
Enregistrer un commentaire