I need to add autocomplete function to a table when searchg by entering a keyword in a textbox. i have less expirience in php laravel.
My requirement is as below. In the interface there is a text box to search and a table is displaying below that.
For an example it's process is like if i enter "a" in the text box, all the records which starting from "a" should display in the table and the displaing outputs in table should change acording to the entering input. If the search textbox is empty all the records should display in the table.
There are two ways of solving this with DataTables.
In case of 1st possibility, this is as simple as including the
css files and then instantiating the
dataTable after the dom has loaded, this will replace the static HTML table with a dynamic searchable table, no additional changes are needed on server end.
In case of 2nd possibility, you are going to need to use to implement
ajax pagination. But this requires a controller(since you are working with
laravel) to output the data in json format for the datatables to process.