This time I want to show you how you add a search functionality to your Laravel application that accomplishes the following features:
- Fulltext search in Eloquent model
- Define searchable columns
- Define result relevance for searchable columns
- Customize the look of the search results based on the model
- Independent search bar.
I want to show how you can create a sortable table and reuse the code with any model you want to display.
As we don’t want to write any function or definition twice or more, let’s extend the BaseController class with the function to get sorted items from a variable model.
In web development there are tons of programs and tools and due to that also complex and very different development strategies.
Luckily dependency handling got a lot easier. For my Laravel project setup we will use 3 different package managers.
Every package manager of course manages a different resource, we will use composer for php packages, npm for everything related to Node.js and Bower for web packages.
I’m going to develop a Laravel application with my friends. The application is called RowBook. It will be a simple tool to log all the trips of the row club Lucerne.