Let's Learn AdonisJS 5 #5.9

Easy Querying with Static Model Query Methods

In this lesson, we'll learn what static methods are available on our Lucid Models to help us easily query records from our database. These methods offer a convenient query option compared to the query builder.

🕑 Chapters

00:00 - Intro / Setup
00:30 - Method Overview
02:18 - All & Serialization Behavior
03:46 - Find & FindOrFail
05:02 - FindBy & FindByOrFail
05:52 - First
06:08 - FindMany
07:10 - Outro

Join The Discussion! (3 Comments)

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

  1. ismailomodara
    Commented 2 months ago

    Hello @tomgobich. Thanks a lot for an amazing series. Really love Adonis and gathering knowledge for my next project. Please what's the next ideal series to follow on completing this one? Any pointers?

    1

    Please sign in or sign up for free to reply

    1. tomgobich
      Adocasts+ Adocasts+
      Commented 2 months ago

      Thank you, ismailomodara! I haven't quite finished this series yet, but I would say if you aren't familiar with auth yet, our User Role Authentication in 15 Minutes lesson would be a good next step, followed by our Bouncer series.

      0

      Please sign in or sign up for free to reply

      1. ismailomodara
        Commented 2 months ago

        Awesome @tomgobich! Thank you very much! You are amazing

        1

        Please sign in or sign up for free to reply