Allow route caching
Route caching is a powerful Laravel5 feature. As this project standed, you couldn't safely bind routes and allow route caching, as you'd lose any binding done in the RouteBinder
object, or always load them altogether.
Now, the RouteBinderServiceProvider
will allow for route caching by using the same methods usually found in the RouteServiceProvider
in your app. This means you can safely remove that service provider from your app/Providers
and only use RouteBinder
objects again!
NOTE: This package does not use Laravel 5's Controller namespacing feature. You should use the php 5.5 ::class syntax and either:
- Import your controller to the
RouteBinder
object via theuse
clause, or - Use the fully qualified class name
Please avoid using literal strings, as this would risk breaking changes while refactoring, even on the most advanced IDEs.