Ordering the middleware through, I traced the underlying instance Illuminate\Foundation\Http\Kernel

/**
 * The priority-sorted list of middleware.
 *
 * Forces non-global middleware to always be in the given order.
 *
 * @var array
 */
protected $middlewarePriority = [
    \Illuminate\Session\Middleware\StartSession::class,
    \Illuminate\View\Middleware\ShareErrorsFromSession::class,
    \Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests::class,
    \Illuminate\Routing\Middleware\ThrottleRequests::class,
    \Illuminate\Session\Middleware\AuthenticateSession::class,
    \Illuminate\Routing\Middleware\SubstituteBindings::class,
    \Illuminate\Auth\Middleware\Authorize::class,
];

And I found two methods: prependToMiddlewarePriority and appendToMiddlewarePriority, there is a different thing, array_unshift.

Here is a simple to describe.

protected $middlewarePriority = [
      // prepend middleware


    \Illuminate\Session\Middleware\StartSession::class,
    \Illuminate\View\Middleware\ShareErrorsFromSession::class,
    \Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests::class,
    \Illuminate\Routing\Middleware\ThrottleRequests::class,
    \Illuminate\Session\Middleware\AuthenticateSession::class,
    \Illuminate\Routing\Middleware\SubstituteBindings::class,
    \Illuminate\Auth\Middleware\Authorize::class,


    // append middleware
];

So, where are we calling the method? App\HttpKernel and overwrite __construct after parent construct.

public function __construct(Application $app, Router $router)
{
    parent::__construct($app, $router);

    $this->appendToMiddlewarePriority(One::class);
    $this->appendToMiddlewarePriority(Two::class);
    $this->appendToMiddlewarePriority(Three::class);
}