1. Create form to input keyword

  2. Query the keyword that match with title

Search

# Search - Form

Using GET method to named route training:index

Search

# Search - Index Method

Check if there is keyword, if there is keyword on query string, run query to search column where like title.

If no keyword, the method will return collection rows from trainings table.

Search

# Search - Pagination

The paginate method automatically takes care of setting the proper limit and offset based on the current page being viewed by the user and append with keywords.

Search