There is a window for dialing the city. How to ensure that when typing letters of a city, cities from a database to these letters are automatically loaded via ajax and drop out a list of these cities in the choices block as in a google search?
<input id="city" name="city"> <div class="variants"></div> Js
$('input').on('input', function(e) { /*что здесь делать*/ }); Php
function city(Request $request) { $abc= $request->input('city'); $allcities=DB::table('city')->all(); //что дальше }