Complete the code to define a middleware group named 'web' in Laravel.
protected $middlewareGroups = [
'web' => [
[1]
],
];The 'web' middleware group typically includes 'EncryptCookies' to handle cookie encryption.
Complete the code to add the 'throttle' middleware to the 'api' middleware group.
protected $middlewareGroups = [
'api' => [
[1]
],
];The 'throttle:60,1' middleware limits API requests to 60 per minute.
Fix the error in the middleware group definition by completing the missing middleware name.
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\[1]::class,
],
];The 'EncryptCookies' middleware class is part of the default 'web' group to encrypt cookies.
Fill both blanks to add 'auth' and 'verified' middleware to the 'web' group.
protected $middlewareGroups = [
'web' => [
[1],
[2],
],
];The 'auth' middleware ensures users are authenticated, and 'verified' ensures email verification.
Fill all three blanks to define a custom middleware group 'admin' with 'auth', 'verified', and 'is_admin'.
protected $middlewareGroups = [
'admin' => [
[1],
[2],
[3],
],
];The 'admin' group requires users to be authenticated, verified, and have admin rights.