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.

Published
Mar 09, 23
Duration
7m 41s

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 - 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. Commented 1 year 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. Commented 1 year 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. Commented 1 year ago

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

        1

        Please sign in or sign up for free to reply