From the course: Building Laravel and Vue.js 2 Web Apps

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Building a list view with detail links

Building a list view with detail links

From the course: Building Laravel and Vue.js 2 Web Apps

Start my 1-month free trial

Building a list view with detail links

- [Instructor] Now we'll create an item list component that shows the items in the selected category in the form of links that will allow us to edit them. We'll take a top-down approach instead of the router first. So, we'll add a route for items. The path will be slash items, the name will be items, and the component we'll call MenuItemList. And, before I forget, I'd just like to import this up here, even though I haven't yet created it. And now we can add a router link for the items view. I'll put it between our existing links, and it will be a router link to a named route called items. And the link text can just be items. We'll also add a route for editing an item. So this path will be slash edit item, name will be edit item without the slash, and the component will the same MenuItem component that add-item uses. Edit-item will also need to take an ID parameter, which we specify with colon ID. And if we set props to true, then this will automatically provide the ID as a prop to the…

Contents