Update src/Illuminate/Routing/UrlGenerator.php

This allows properly formatted path parameters to be used (those beginning with a trailing slash; e.g. "/path/to/page" & the root "/"), without breaking past compatibility by still allowing ("path/to/page"). These path parameters are used in methods such as URL::to('/page'), Redirect::to('/page'), etc.

Also, because of how this change is done, this fixes an issue where the root path was being output incorrectly by URL::to. URL::to('/') used to output "http://domain.com" (without a trailing slash), but now outputs "http://domain.com/" as it should for the root URL.
Added test assertions to RoutingUrlGeneratorTests.php
Update tests/Routing/RoutingUrlGeneratorTest.php
Fixing bug where Request::has() would throw error because of trying to use trim if the data type was an array
Tiny bit of clean up - moved the $tail slash to the return
Fixing bug where Request::has() would throw error because of trying to use trim if the data type was an array
Added View::exists() method to check view existence. Closes #398.

Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
Merge pull request #416 from jasonlewis/feature/view-exists

Added View::exists() method to check view existence.
Merge pull request #404 from ryanzec/request-has-array

Fixed Request::has() from throwing error if data checking is an array
Merge pull request #395 from j20/fix-properPathParamsAllowed-URLto('/')IsCorrect

Fix - Allow properly-formatted path parameters to work (also fixes URL::to('/')'s output)