classes/Application.php
public function addMiddleware($middleware, $priority = null)
	{
		$this->middlewares->insert($middleware, (int) $priority);
	}
public function addMiddleware($middleware, $priority = null)
	{
		$this->middlewares->insert($middleware, (int) $priority);
	}
public function addMiddleware ( $ middleware , $ priority = null ) { $ this -> middlewares -> insert ( $ middleware , ( int ) $ priority ) ; }
Add a middleware to the application.

@param \Closure|string|array $middleware
@param int                   $priority
Add a middleware to the application .