letrunghieu / active

The helper class for Laravel applications to get active class base on current route
https://www.hieule.info/tag/laravel-active/
MIT License
414 stars 82 forks source link

How to handle model binding route?? #24

Closed 0xuhe closed 8 years ago

0xuhe commented 8 years ago

If I have bound the route param to route, eg: /{course}/{episode}, and episode bound with episode model

if_route_param('episode', $episode) will return null.

$this->route->parameter($param) will return the episode model, and it don't equal $episode model

letrunghieu commented 8 years ago

The current version of this package has not supported model binding routes yet. I am going to update the if_route_param function to use the id property of the model instead of the model object itself in the comparison.

letrunghieu commented 8 years ago

Now, this feature is implemented in version 3.2.0