How is the execution sequence of laravel middleware disrupted after encountering auth:api?

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 )

Mar.21,2021

Laravel provides middleware priority, which is the default middleware priority, and others should be ranked after them

protected $middlewarePriority = [
    \Illuminate\Session\Middleware\StartSession::class,
    \Illuminate\View\Middleware\ShareErrorsFromSession::class,
    \App\Http\Middleware\Cross::class,
    \App\Http\Middleware\Options::class,
    \Illuminate\Auth\Middleware\Authenticate::class,
    \Illuminate\Session\Middleware\AuthenticateSession::class,
    \Illuminate\Routing\Middleware\SubstituteBindings::class,
    \Illuminate\Auth\Middleware\Authorize::class,
];
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b23d-2c261.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b23d-2c261.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?