undefined

Router

The AdonisJS Router provides routing capabilities for AdonisJS applications. It allows grouping, param validation, sub-domains, middleware assignment, naming, and so much more. It integrates deeply with the HttpContext and Edge.

6 Series
57 Lessons
Router

Lessons

Video preview
Route Groups & Middleware
Video preview

Middleware & Grouping Routes

Learn AdonisJS middleware for intercepting HTTP requests. Control request flow, implement logging, and secure your applications.

Video preview
Manual & Automatic Route Identifiers
Video preview

Route Names & Type-Safe Route Generation

Learn type-safe route generation in AdonisJS using route names. Generate URLs with named routes for maintainable links and redirects. We'll also inspect the generated type for our route definitions and default route naming.

Video preview
Barrel Files & Controllers
Video preview

Controllers, Barrel Files, & Subpath Imports

Learn AdonisJS controllers, barrel files, and subpath imports. Organize code with controllers and leverage barrel files for cleaner imports.

Video preview
Route Parameters & Matchers
Video preview

Route Parameters & Matchers

Learn AdonisJS route parameters and matchers. Capture dynamic segments in URLs and validate and cast with route matchers.

Video preview
All About View State
Video preview

View State & Passing Data to Views

Learn how to pass data from controllers to views using state in AdonisJS. We'll also discuss the three different types of state in EdgeJS: render, local, and global.

Video preview
Routes & Rendering Views
Video preview

Defining Routes & Rendering Views

Learn how to define routes and render views in AdonisJS. Understand route definitions, rendering views, and the router service.

Video preview
Full-Text Search
Video preview

Performing Full-Text Search

In this lesson, we'll learn how to perform a full-text search with Meilisearch while also building the structural base for what will eventually serve as our multi-search autocomplete.

Video preview
Redirect back after login
Video preview

How To Redirect Back to the Previous Page After Login with AdonisJS

In this lesson, we'll learn an easy way we can safely redirect our user's back to their original page after they login or register in an AdonisJS application. We'll also verify the URL matches an actual GET route definition within our application.

Video preview
Basic Course Filtering
Video preview

Basic Course Search & Filter

In this lesson, we'll add a new search endpoint for our courses and enable some basic filter functionality along with it. We'll be able to search by course name likeness, status, difficulty, and/or access level.

Video preview
Lesson Operations
Video preview

Lesson Operations

In this lesson, we'll implement most of the CRUD functionality for our lessons, including creating, updating, deleting, and patching our lesson's tags. We'll also discuss why we'll treat lessons as a top-level resource.

Video preview
Get Modules Endpoint
Video preview

Getting Just Course Modules & Lessons

In this lesson, we'll remove our GET module route, using the except method on our resource. Then we'll refactor to add a GetModules action

Video preview
Course Modules Nested Resource
Video preview

Course Module Nested Resource

In this lesson, we'll work on nested resourceful endpoints for our course modules. We'll add endpoints to create, update, patch, and deleting modules from a specific course.

Video preview
Paginating Courses
Video preview

Paginating our Course List

In this lesson, we'll transform our courses list endpoint into a pagination endpoint. We'll check and validate our query string for a page and per page parameter that we'll then use to fetch pages of our courses.

Video preview
Status CRUD
Video preview

Status API CRUD

In this lesson, we'll duplicate everything we did one more time for our organization's statuses.

Video preview
Access Level CRUD
Video preview

Access Level API CRUD

In this lesson, we'll walk through adding API endpoints for the full CRUD (create, read, update, and delete) flow for our organization's access levels.

Video preview
Getting A Difficulty
Video preview

Getting A Specific Difficulty

In this lesson, we'll add a GET API route enabling us to get the details of a specific difficulty by providing the difficulties id via route parameter.

Video preview
Listing Difficulties
Video preview

Listing Organization Difficulties

In this lesson, we'll begin work on our first CRUD-based API resource by adding the ability to query a list of all our organization's difficulties.

Video preview
Simple API Versioning
Video preview

Simple API Versioning

In this lesson, we'll implement a simple versioning mechanism for our API. Versioning allows us to safely make breaking changes without breaking our user's implementations of our API.

Showing 1 to 18 of 55 results