I'm a newbie in Laravel. Can someone explain what is the difference from web, auth, and guest middleware in Laravel 5.8?
Asked
Active
Viewed 314 times
1 Answers
0
auth middleware allows only for authenticated users to access the routes and your logic behind it. For example, only auth users can create questions and give answers. guest middleware can only be accessed by unauthenticated users. For example, login and register page. And web middleware is a group of middleware that you commonly use in your application. Such as cookie encryption, csrf token verification, and etc.

Dino Numić
- 1,414
- 2
- 9
- 17