Vespakoen/laravel-menu — pull request #43 by mauvm (2013-11-16 09:32:46+00:00)
Title: Added PR#41 and fixed root url item active check (for subdirectories).

Added pull request as suggested by @dustingraham (to prevent conflict) and fixed active check for the root item.

When using Laravel in a subdirectory (http://example.com/sub/ for example) the item for the route `/` wouldn't be activated. The `$request->fullUrl()` call returned the url __with__ a trailing slash - while `$this->getUrl()` returned the url __without__ the trailing slash.

Also cached the `$url` and `$request` variables and added identical comparison operators (`===`) to speed things up a little.