DEV Community


Posted on • Originally published at


Multiple Authentication Using Middleware In Laravel 9

In this article, we will see multiple authentication using middleware in laravel 9. Here, we will learn how to multiple authenticate using middleware in laravel 9. Using middleware we authenticate the user.

Laravel includes a middleware that verifies the user of your application is authenticated. If the user is not authenticated, the middleware will redirect the user to your application's login screen.

So, let's see laravel 9 multi auth using middleware, multi auth in laravel 9.

Laravel 9 multi auth creates a middleware for checking the user. It is a super admin or user and manager. And create middleware and configure it in the kernal.php file.

In this example, we will add three types of users:

  1. User

  2. Manager

  3. Super Admin

When we log in as a user then it will redirect to user routes. If you log in as super admin then it will redirect to super admin routes.

Top comments (0)

Advice For Junior Developers

Advice from a career of 15+ years for new and beginner developers just getting started on their journey.