Control panel icon

Controllers

7 Series
24 Lessons
3h 55m

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
Partial and Lazy Data Loading

Partial and Lazy Data Loading and Evaluation

In this lesson, we'll learn about Inertia's partial reload functionality that allows us to refresh only specifically specified prop items for our page. We'll also examine lazy properties and how our props are evaluated with partial reloads.

Organizing your AdonisJS Logic
AdonisJS In 30 #7.0
・
Jul 22

Three Approaches for Organizing your AdonisJS Business Logic Operations

In this lesson, we'll dive deep into three different ways we can organize our code; fat controllers, services, and actions. We'll also discuss circular dependencies, static and non-static service methods, and dependency injection.

Video preview
Posting an Array of Objects with HTML Forms
Let's Learn AdonisJS 6 #11.8
・
Jun 26

Posting Objects, Arrays, and an Array of Objects in HTML Forms

In this lesson, we'll learn how we can use form field names to send an array of objects with our HTML form submission. We'll discuss pitfalls to watch out for and how we use AlpineJS to simplify index syncing within our field names.

Video preview
Download Storage Images
Let's Learn AdonisJS 6 #11.7
・
Jun 20

Using A Wildcard Route Param to Download Storage Images

In this lesson, we'll learn how we can utilize a wildcard route parameter to dynamically download images that've been uploaded and stored within our application storage.

Video preview
Uploading Movie Cover Images
Let's Learn AdonisJS 6 #11.6
・
Jun 20

Uploading Movie Cover Images in our Create or Edit Form

In this lesson, we'll learn how to upload movie cover images when either creating or editing a movie via our create or edit form.

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!

Showing 1 to 20 of 24 results