Control panel icon

Controllers

6 Series
19 Lessons
2h 33m

Controllers are a great way to cleanly direct the business logic needed to handle requests for a route within your application.

Series.

Lessons.

Video preview
Displaying A User's Profile
Let's Learn AdonisJS 6 #10.4
Jun 01

Displaying A User's Profile

In this lesson, we'll learn how you can mimic popular sites and use an @ handle to display your user's profiles

Video preview
Allowing Users To Edit Their Profile
Let's Learn AdonisJS 6 #10.1
May 29

Using Dependency Injection to Update A User's Profile

In this lesson, we'll learn how to allow users to edit their profiles. We'll also cover how we can inject the HttpContext into a service instance using Dependency Injection (DI).

Video preview
Listing and Filtering User Watchlist Items
Let's Learn AdonisJS 6 #9.2
May 10

Listing and Filtering User Watchlist Items

In this lesson, we'll take our movie filter, and learn how we can reuse it to display a filterable list of the user's watchlist movies.

Video preview
Toggling A Movie in an Authenticated User's Watchlist
Let's Learn AdonisJS 6 #9.1
May 10

Toggling A Movie in an Authenticated User's Watchlist

In this lesson, we'll learn how to add the ability to toggle whether a user has a movie within their watchlist. We'll also query and display whether a movie is in the authenticated user's watchlist as well.

Video preview
How To Paginate Filtered Query Results
Let's Learn AdonisJS 6 #8.6
May 06

How To Paginate Filtered Query Results

In this lesson, we'll learn about AdonisJS Model Query Builder pagination and walk through an example of how we can easily paginate the results of our filtered movies.

Video preview
Validating Query String Filter Values
Let's Learn AdonisJS 6 #8.5
May 06

Validating Query String Filter Values

In this lesson, we'll learn how to use VineJS, AdonisJS' Validator, to validate the filter properties and values we have within our query string.

Video preview
How To Apply A Dynamic Sort Filter To Your Query
Let's Learn AdonisJS 6 #8.3
May 01

How To Apply A Dynamic Sort Filter To Your Query

In this lesson, we'll learn how we can add a user-selected sort option to our filters. Then, we'll apply the selected filter to our movie query

Video preview
Filtering A Query By Pattern Likeness
Let's Learn AdonisJS 6 #8.1
Apr 27

Filtering A Query By Pattern Likeness

In this lesson, we'll learn how to add a pattern filter to our movies.index page that will allow us to filter our movies list by title using a case-insensitive pattern search.

Video preview
Creating A Movie List Page
Let's Learn AdonisJS 6 #8.0
Apr 27

Creating A Movie List Page

In this lesson, we'll create a page to list all of our movies. Since we have a lot of movies, in this module, we'll focus on adding filters and pagination to this list.

Video preview
Logging Out An Authenticated User
Let's Learn AdonisJS 6 #7.3
Apr 24

Logging Out An Authenticated User

In this lesson, we'll learn how to logout an authenticated user using a POST request with CSRF protection.

Video preview
Authenticating A Newly Registered User
Let's Learn AdonisJS 6 #7.1
Apr 20

Authenticating A Newly Registered User

In this lesson, we'll learn how we can authenticate, or login, a new user who just registered with our application. We'll then see how we can populate the authenticated user's details on subsequent requests.

Video preview
AdonisJS 6 Session Authentication in 15 Minutes
AdonisJS In 30 #5.0
Apr 18

AdonisJS 6 Session Authentication in 15 Minutes

In this lesson, we'll learn how to add authentication to a new AdonisJS 6 application using the session guard. In these 15 minutes, you'll learn how to register a user, logout a user, verify a user's credentials and log them in, and more.

Video preview
Creating A Login Form and Validator
Let's Learn AdonisJS 6 #6.5
Apr 12

Creating A Login Form and Validator

In this lesson, we'll apply what we've learned to create a login page as well as a validator for our login form.

Video preview
Accepting Form Data
Let's Learn AdonisJS 6 #6.0
Apr 05

Accepting Form Data

In this lesson, we'll take a look at how we can create a register form and accept data from that form within our route handler.

Video preview
Adding A User Profile Model, Migration, Factory, and Controller
Let's Learn AdonisJS 6 #4.12
Mar 11

Adding A Profile Model, Migration, Factory, and Controller

Uh oh, a new requirement has come in and now we also need to account for user profiles! In this lesson, we'll learn how we can easily create a new model, migration, factory, and controller for an entity in one fell swoop!

Video preview
Cleaning Up Routes with Controllers
Let's Learn AdonisJS 6 #2.10
Jan 31

Cleaning Up Routes with Controllers

In this lesson, we'll learn what controllers are and how they can be used to drastically simplify our route definitions by allowing us to move our route handlers off the route definition and into the controller.

Let's Learn AdonisJS 5 #3.1
Dec 02, 21

Route & Controller Resources

In this lesson, we'll learn what a resource is and how we can quickly and easily define a route resource and handle each resourceful route with a resource controller.

Let's Learn AdonisJS 5 #3.0
Nov 10, 21

Handling Routes with Controllers

In this lesson, we'll learn about Controllers and how we can keep our route definitions clean and easy to scan by extracting our route handlers into these Controllers.

Let's Learn Adonis 5: Controllers, Services, Resources, and Namespacing

In this lesson, we'll be hammering down several Adonis topics in one swoop. We'll be covering Controllers, which in turn allow us to utilize Services, Resources, and Namespacing.