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
50 Lessons
Router

Lessons

Video preview
Adocasts Plus Exclusive
Free in 7 days
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
Adocasts Plus Exclusive
Exclusive
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
Adocasts Plus Exclusive
Exclusive
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
Adocasts Plus Exclusive
Exclusive
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
Adocasts Plus Exclusive
Exclusive
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
Adocasts Plus Exclusive
Exclusive
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
Adocasts Plus Exclusive
Exclusive
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
Adocasts Plus Exclusive
Exclusive
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
Adocasts Plus Exclusive
Exclusive
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
Adocasts Plus Exclusive
Exclusive
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
Adocasts Plus Exclusive
Exclusive
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.

Video preview
Adocasts Plus Exclusive
Exclusive
Our first API endpoint
Video preview

Our First API Endpoint to Get Our Organization's Details

In this lesson, we'll add the first endpoint to our API. With this endpoint we'll return back the Organization's details for the provided Access Token with the request.

Video preview
Adocasts Plus Exclusive
Exclusive
Goal of our API
Video preview

The Goal of our REST API

In this lesson, we'll briefly give an overview of REST and how we'll be taking a practical approach to it when building our API.

Video preview
Adocasts Plus Exclusive
Exclusive
Accepting an Organization Invite
Video preview

Accepting an Organization Invitation

We'll add our route to handle accepting an organization invite. Within this route, we'll verify our signed url, ensure the invitation is valid, accept the invite, and gracefully handle the use-case where users may need to first login or register.

Video preview
3 Easy Ways to Split AdonisJS 6 Routes
Video preview

3 Easy Ways to Split Route Definitions into Multiple Files in AdonisJS 6

Does your application have a ton of routes? In this lesson, we'll cover 3 easy ways you can split your application's route definitions into multiple files.

Video preview
Adocasts Plus Exclusive
Exclusive
Splitting Our Routes Between Auth & Web
Video preview

Splitting Our Routes Between Auth & Web

In this lesson, we'll split our routes into two files: auth and web. Our auth routes file will contain all our authentication-based route definitions and our web routes will contain the remaining.

Video preview
The Link Component
Video preview

The Link Component and Programmatic Linking

In this lesson, we'll explore Inertia's Link component and its props. We'll then examine how to link between pages programmatically using Inertia's router.

Video preview
Download Storage Images
Video preview

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.

Showing 1 to 18 of 48 results