Defining A Structure for our Movie using Models

In this lesson, we'll introduce the concept of models by using one to define the properties our movies should contain. We'll then stub some methods that will mock calls we'll later be able to use to load data from our database.

Published
Jan 31
Duration
9m 38s

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

Join The Discussion! (8 Comments)

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

  1. Commented 3 months ago

    cannot fine module 'luxon' or its corresponding type declarations

    0

    Please sign in or sign up for free to reply

  2. Commented 3 months ago

    error message: Argument of type 'Hash' is not assignable to parameter of type '() => Hash'.

    0

    Please sign in or sign up for free to reply

  3. Commented 3 months ago

    Command "make:model" is not defined

    0

    Please sign in or sign up for free to reply

    1. Commented 3 months ago

      Hi Amitava! Can you please provide some additional context around these errors? Did you clone this series' repo at a certain branch? Is this a brand new AdonisJS 6 project?

      0

      Please sign in or sign up for free to reply

      1. Commented 6 days ago

        I've found the same error running "node ace make:model movie"

        This command is unavailable in the ace make options (running "node ace list").

        0

        Please sign in or sign up for free to reply

        1. Commented 2 days ago

          Hi Antoniogiroz! Please make sure you have Lucid installed and configure inside of your project.

          npm i @adonisjs/lucid
          Copied!

          Then

          node ace configure @adonisjs/lucid
          Copied!

          If you continue to have issues, please provide some more details or a repository with a reproduction of your issue.

          1

          Please sign in or sign up for free to reply

          1. Commented 2 days ago

            It works! Thanks!

            1

            Please sign in or sign up for free to reply

            1. Commented 22 hours ago

              Awesome to hear! Anytime!!

              0

              Please sign in or sign up for free to reply