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.

Rendering the menu

Rendering the menu

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

Start my 1-month free trial

Rendering the menu

- [Instructor] Now we'll finally get a look at the menu page whose content is managed with our Vue Router and Vuex powered admin tool. In this video, we won't be discussing Vuex or even Vue, so I'm really just sneaking it into this chapter for completeness's sake. I also won't be writing code in this video, since displaying the menu doesn't involve any techniques that we haven't discussed yet, except for one that has to do with Eloquent queries. If I click on Menu now in the nav, here we are on our menu page. And in the controller, we're pulling in the categories, along with our menu items, and just looping through them, and in turn, looping through the menu items to display the photo, name, description, and price. If I go back to the home page, we also have the named anchor setup that I said we would do back in chapter two so that I can link directly to a category from the home page. So if we look at the Blade template now, we see a foreach for categories and a foreach for category…

Contents