![Control panel icon](/img/1/sound-mixer_3591072_1707160896041.png?w=800)
![Control panel icon](/img/1/sound-mixer_3591072_1707160896041.png?w=192)
Controllers
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](https://videos.adocasts.com/68bde41a-ceb4-4bf5-987b-0d31aa76f817/preview.webp)
![Adocasts Plus Exclusive](/imgs/plus-badge-100.png)
![Organizing your AdonisJS Logic](/img/1/organizing-business-logic-operations_1721419785966.jpeg?w=650)
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](https://videos.adocasts.com/4e59a1e8-3e50-43f8-bfee-ee50dfc1d930/preview.webp)
![Posting an Array of Objects with HTML Forms](/img/1/posting-an-array-of-objects-with-html-forms_1719352308432.jpeg?w=650)
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](https://videos.adocasts.com/2b46194a-5849-4216-9498-689e375ace71/preview.webp)
![Download Storage Images](/img/1/using-a-wildcard-route-param-to-download-storage-images_1718819858520.jpeg?w=650)
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](https://videos.adocasts.com/65996d54-3d3f-4f4f-8d4e-388f864a5bbc/preview.webp)
![Uploading Movie Cover Images](/img/1/uploading-movie-cover-image-in-our-create-or-edit-form_1718819681468.jpeg?w=650)
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](https://videos.adocasts.com/b859bf7d-38ef-42a6-a72b-a80d6cf71410/preview.webp)
![Displaying A User's Profile](/img/1/displaying-user-profiles_1717190196823.jpeg?w=650)
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](https://videos.adocasts.com/08eeb95a-57e5-499e-a5fe-014494656798/preview.webp)
![Allowing Users To Edit Their Profile](/img/1/allowing-users-to-edit-their-profile_1716938760865.jpeg?w=650)
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](https://videos.adocasts.com/c1df2600-42f6-4f64-af56-04695e184561/preview.webp)
![Listing and Filtering User Watchlist Items](/img/1/listing-and-filtering-watchlist-items-for-a-user_1715289606177.jpeg?w=650)
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](https://videos.adocasts.com/fffd7068-d4e9-4c15-b895-dd826ac36cb6/preview.webp)
![Toggling A Movie in an Authenticated User's Watchlist](/img/1/toggling-a-movie-in-an-authenticated-users-watchlist_1715288820404.jpeg?w=650)
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](https://videos.adocasts.com/0c3db61a-4c17-429d-b4e1-2b0e9ecb30f5/preview.webp)
![How To Paginate Filtered Query Results](/img/1/how-to-paginate-filter-results_1714943963112.jpeg?w=650)
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](https://videos.adocasts.com/fab3ed6f-2d0d-4d3e-8a16-a787d02274ce/preview.webp)
![Validating Query String Filter Values](/img/1/validating-query-string-filter-values_1714943830507.jpeg?w=650)
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](https://videos.adocasts.com/0ba33b0c-1e03-42cc-a6ca-e1d695af70ad/preview.webp)
![How To Apply A Dynamic Sort Filter To Your Query](/img/1/how-to-apply-a-dynamic-sort-filter_1714514184731.jpeg?w=650)
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](https://videos.adocasts.com/03ed95b5-9163-4320-b55c-822cf12ebad9/preview.webp)
![Filtering A Query By Pattern Likeness](/img/1/filtering-a-search-by-pattern-likeness_1714173269742.jpeg?w=650)
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](https://videos.adocasts.com/b6463a21-999a-459e-b04e-95c91b24ac25/preview.webp)
![Creating A Movie List Page](/img/1/listing-our-movies_1714172845749.jpeg?w=650)
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](https://videos.adocasts.com/8a4cc3b8-1160-4ccf-90a5-1ab701e95ae5/preview.webp)
![Logging Out An Authenticated User](/img/1/logging-out-an-authenticated-user_1713910484545.jpeg?w=650)
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](https://videos.adocasts.com/0236fb26-92a4-4f33-8d46-7f9c5ee2ec2f/preview.webp)
![Authenticating A Newly Registered User](/img/1/authenticating-a-newly-registered-user_1713557940626.jpeg?w=650)
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](https://videos.adocasts.com/b5a90412-ec8a-44a1-ae56-e797f502aba3/preview.webp)
![AdonisJS 6 Session Authentication in 15 Minutes](/img/1/adonisjs-6-session-auth-in-15-minutes_1713397471654.jpeg?w=650)
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](https://videos.adocasts.com/d8a6d8c3-98c6-4940-90f7-abc47a845746/preview.webp)
![Creating A Login Form and Validator](/img/1/creating-a-login-form_1712872122576.jpeg?w=650)
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](https://videos.adocasts.com/538727ec-a78b-4728-bd29-367cee6cd00f/preview.webp)
![Accepting Form Data](/img/1/accepting-form-data_1712263716206.jpeg?w=650)
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](https://videos.adocasts.com/50fe1af9-a05b-424a-b9d6-a2693126bcff/preview.webp)
![Adding A User Profile Model, Migration, Factory, and Controller](/img/1/adding-a-user-profile_1710102318390.jpeg?w=650)
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](https://videos.adocasts.com/72a360c1-f533-4aef-980a-8dfc5446772f/preview.webp)
![Cleaning Up Routes with Controllers](/img/1/cleaning-routes-with-controllers-02_1706711861915.jpeg?w=650)
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.
Showing 1 to 20 of 23 results