AbdulBazith's avatar

How to make search box in Laravel or data table which filters?

I am having a table in db called vendor_details consist of fields (vendor_id, vendor_name,vendor_location,vendor_area,vendor_address, vendor_contactnumber) I displayed these details in table structure in my form

I need a search box where I can use customized search based on vendor_id , vendor_name, vendor_location and vendor-contact number. I need to display like datatable format

Filtration should be also done. How can I do this can anyone help me? Please share any video link that would help me.

0 likes
8 replies
AbdulBazith's avatar

sorry @Sergiu17 past 2 weeks suffered from fever so unable to see your reply. thankz for the link. but i need a data table format which also have filters and export to pdf, excel options

AbdulBazith's avatar

@Sergiu17 thankz for your search but the matter in the link is not useful becoz he mentioned the whole data in the ajax..

1 like
Vilfago's avatar
Vilfago
Best Answer
Level 20

You can use datatables on an already formated table in html.

  1. Get your data
  2. Create your table properly with a foreach loop (must have thead and tbody, and other requirement asked by datatables)
  3. Transform the table to datatable as per the doc.
1 like
AbdulBazith's avatar

thank you every one for your reply. i will try the data table package.

AbdulBazith's avatar

Guys i thinkdata table cant help me becoz i need multiple filters. so can anyone suggest another way which helps me. Displaying data in table format, Now need to search based on id, or name or price or address sometimes with id and name and price. like this can any one suggest idea please

Please or to participate in this conversation.