Its common to give user an option to filter the data which they wanted when the data amount is huge and normally you may provide different conditions to filter the data. In this article, I will show you how to build a condition based query in Laravel. Its pretty easy to be done by the query builder.
for example: you may give user two options to filter the data. one is the status of your order and other is the general search for the different fields.
for the status option ,we can provide a dropdown list and the general search we can provide a input field to the user.