Fixes a bug when using closure route with custom illuminate.route.dispatcher (e.g Illuminate\Routing\ControllerDispatcher).

http://cl.ly/image/3a263s0Z2Z0t
Signed-off-by: crynobone <crynobone@gmail.com>
[5.0] Add hasParameter function to route
Add only and except to controller middle wares, DRY.
Merge pull request #6064 from emmanuelgautier/master

[5.0] Add hasParameter function to route
Merge pull request #6050 from crynobone/patch/custom-dispatcher-on-closure

[5.0] Fixes A Routing Bug