Software Engineer · Teacher · Author · Vegan

Laravel 1

This assignment will use Laravel and the chinook SQLite database.

All Laravel assignments, labs, and class demos will build on the same installation. Start this assignment from the same installation we did in class.

The Genres Page

Create a page with the route /genres that displays all genres from the genres table. Define a route that maps to a controller called GenresController.

Each genre should be an anchor that links to /tracks?genre=GENRE_NAME, where GENRE_NAME is replaced with each genre, i.e. Rock, Blues, Reggae, etc.

The Tracks by Genre Page

Next, create a page with the route /tracks. This page should display all tracks for the genre query string parameter. For each track, display the following information:

The /tracks route should map to a controller called TracksController.

To access the genre query string parameter value, use the query() method off of the request object. Check out the “Retrieving Input From The Query String” documentation to see an example.

Other Requirements