It’s about three months from my first release of hieu-le/active package. For someone does not know it, this package is created to allow developers display the active class easily based on the current route, controller, or, method of Laravel application. However, when the framework matures day by day, my package seems to be out of date. I have made some patches to make it support the current latest version of Laravel.
Change the version of dependencies
The most important thing to change is the version of Illuminate packages. As you known, Illuminate repositories is readonly and have the same version as the current laravel framework version. To make hieu-le/active works with Laravel 4.2, the version of Illuminate packages need changing from 4.1.* to 4.2.*.
Update “require” signature
From this version, you should change your composer.json to use hieu-le/active . Instead of using dev-master version, using the tilde (~) syntax as follow:
When Laravel change its mirror version, I will update my dependencies and you will not required to change your composer.json any more.
Support new method
In version 1.0, you can check the current routes by its name, controller, method, or URI. However, you need to supply the extract name to check with. The only exceptions is that you can check the URI with a patterns instead of a name. In version 1.2, I wrote new method call routePattern . With this method, now you can check the routes name with some string using the * character, eg: “*.post.create”, “*.index”, “post.*”, … This method will be very useful when working with resrouce controller.