Building your main search page
In this section, I will start to build the search page. To being with, we will add a search bar, and then I will show how to add a form that uses GET
to query the API to get comics once the user clicks Search. In a later recipe we will convert this to Angular.
Getting started…
The previous two recipes got us going with a home page and a message area, and now we are set to add a form to that page and update the controller.
How to do it…
- First, we are going to give our route a name, so update your
routes.php
file: - Now, when you run
php artisan route:list
, you will seehome
as a name: - Now we will use that route name for our ...
Get Laravel 5.x Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.