code: public function addMiddleware($middleware, $priority = null)
  	{
  		$this->middlewares->insert($middleware, (int) $priority);
  	}
docs: Add a middleware to the application.
  
  @param \Closure|string|array $middleware
  @param int                   $priority