the following code:
Route::middleware(["cross" , "options", "auth:api"])->group(function(){
Route::match(["get" , "post" , "options"] , "test/oauth" , "Test@oauth");
});
normal I think the middle execution order: cross-> options-> auth:api
, but this side is very stupid! The actual execution order: auth:api-> cross-> options
! I"ve been fooled. Why is auth
middleware given priority?
how can I get him to execute in order according to my intention? ( cross-> options-> auth:api
)