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.
Working with related models
From the course: Building Laravel and Vue.js 2 Web Apps
Working with related models
- Before we work on the list component, for listing menu items by category, we'll see the database with menu items. Using a seeder file, that you can find in the exercise files for this video. In windows, drag and drop into VS code may not work when you're running as administrator. So, I'm just going to add this exercise files folder to the workspace. So, three eight, begin. And now I'm just going to copy and paste menu items table seeder, into the database seeds folder. Let's take a look at this file. If you're going to try running this yourself, you want to make sure you have all four categories in the database and that the names match exactly. So it could look up the IDs and then insert items with those IDs. Now, because we haven't created this seeder with artisan we need to run composer dump autoload. So that, this menu items table seeder class can be autoloaded. When that's done, we can run artisan db seed with the class option. Don't run artisan db seed without that because…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Protecting admin pages with gates4m 30s
-
(Locked)
Installing and configuring Vue Router4m 56s
-
(Locked)
Using props and router-link4m 50s
-
(Locked)
Enabling Vue Router history mode5m 38s
-
(Locked)
Validating form submissions5m 23s
-
(Locked)
Displaying model validation errors5m 43s
-
(Locked)
Managing file uploads6m 50s
-
(Locked)
Working with related models4m 39s
-
(Locked)
Building a list view with detail links6m 4s
-
(Locked)
Reusing form components3m 56s
-
(Locked)
Using Laravel form requests3m 48s
-
(Locked)
Using Vue Router navigation guards3m 37s
-
-
-