Ready to get started?

Join Adocasts Plus for $8.00/mo, or sign into your account to get access to all of our lessons.

robot mascot smiling

Creating, Editing, & Deleting Course Modules

In this lesson, we'll add the ability to create, edit, and delete a course's modules using the reusable components and composables we've created in past lessons.

Published
Dec 06
Duration
15m 57s

Developer, dog lover, and burrito eater. Currently teaching AdonisJS, a fully featured NodeJS framework, and running Adocasts where I post new lessons weekly. Professionally, I work with JavaScript, .Net C#, and SQL Server.

Adocasts

Burlington, KY

Chapters

00:00 - Implementing our Resource Actions Composable and FormDialog
02:06 - Implementing our Confirm Destroy Dialog
02:53 - Adding our Module Create & Edit Functions
04:13 - Adding our Click Handlers & Actions
05:12 - Adding our Submission Handlers
05:50 - Stubbing our ModulesController Methods
06:10 - Creating our Store, Update, and Destroy Module Actions
06:34 - Defining the Module Validator
07:11 - Creating A New Module with our Store Module Action
09:46 - Updating A Module with our Update Module Action
10:26 - Deleting A Module with our Destroy Module Action
12:42 - Filling out our ModulesController Methods
14:12 - Defining the Module Route Definitions
15:00 - Testing our Module CRUD Operations

Small Note

Within our StoreModule action, we discuss how we're querying through our organization to get the desired course via it's courseId as a way to verify the courseId belongs to the organization. We're also then using that queried course to create the module.

While this works great, I wanted to also mention that you can directly validate your route parameters inside your VineJS Validations in case you'd prefer to do that instead.

Ready to get started?

Join Adocasts Plus for $8.00/mo, or sign into your account to get access to all of our lessons.

Join The Discussion! (0 Comments)

Please sign in or sign up for free to join in on the dicussion.

robot comment bubble

Be the first to Comment!