That's a middleware group that is applied to your endpoint. So in your app/Http/Kernel.php you can see which middlewares are in that group, and the request will need to pass all of them in order to get to your controller.
Mar 2, 2022
6
Level 4
what is the use api middleware in laravel 8
I am using default api middleware in laravel.can any one tell me what is the use of api middleware?
Route::group(['middleware' => ['api']], function(){
Route::get('get-list-users',[App\Http\Controllers\UserListApiController::class, 'list_of_users']);
});
Please or to participate in this conversation.