{"action":"created","issue":{"url":"https://api.github.com/repos/efficiently/authority-controller/issues/21","labels_url":"https://api.github.com/repos/efficiently/authority-controller/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/efficiently/authority-controller/issues/21/comments","events_url":"https://api.github.com/repos/efficiently/authority-controller/issues/21/events","html_url":"https://github.com/efficiently/authority-controller/issues/21","id":63846070,"number":21,"title":"Allow closure does not get called when Route Model Binding is enabled","user":{"login":"TUNER88","id":1565397,"avatar_url":"https://avatars.githubusercontent.com/u/1565397?v=3","gravatar_id":"","url":"https://api.github.com/users/TUNER88","html_url":"https://github.com/TUNER88","followers_url":"https://api.github.com/users/TUNER88/followers","following_url":"https://api.github.com/users/TUNER88/following{/other_user}","gists_url":"https://api.github.com/users/TUNER88/gists{/gist_id}","starred_url":"https://api.github.com/users/TUNER88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TUNER88/subscriptions","organizations_url":"https://api.github.com/users/TUNER88/orgs","repos_url":"https://api.github.com/users/TUNER88/repos","events_url":"https://api.github.com/users/TUNER88/events{/privacy}","received_events_url":"https://api.github.com/users/TUNER88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-23T22:11:24Z","updated_at":"2015-03-24T11:59:22Z","closed_at":null,"body":"As soon I start using [Route Model Binding](http://laravel.com/docs/5.0/routing#route-model-binding) allow closure does not get called and user get access to the resource. If I disable Route Model Binding everything works fine.\r\n\r\n```php\r\n// app/Providers/RouteServiceProvider.php\r\npublic function boot(Router $router)\r\n{\r\n    parent::boot($router);\r\n\r\n    $router->model('users', 'App\\User');\r\n}\r\n```\r\n\r\n```php\r\nif ($user->hasRole('admin')) {\r\n    // works fine \r\n    // $authority->allow('manage', 'App\\User'); \r\n\r\n    // closure does not get called\r\n    $authority->allow('manage', 'App\\User', function ($self, $user) {\r\n        return false;\r\n    });\r\n\r\n} else {\r\n    $authority->allow('read', 'all');\r\n}\r\n```\r\n\r\nAny ideas how to fix it?\r\nI'm using Laravel 5."},"comment":{"url":"https://api.github.com/repos/efficiently/authority-controller/issues/comments/85467746","html_url":"https://github.com/efficiently/authority-controller/issues/21#issuecomment-85467746","issue_url":"https://api.github.com/repos/efficiently/authority-controller/issues/21","id":85467746,"user":{"login":"tortuetorche","id":5038872,"avatar_url":"https://avatars.githubusercontent.com/u/5038872?v=3","gravatar_id":"","url":"https://api.github.com/users/tortuetorche","html_url":"https://github.com/tortuetorche","followers_url":"https://api.github.com/users/tortuetorche/followers","following_url":"https://api.github.com/users/tortuetorche/following{/other_user}","gists_url":"https://api.github.com/users/tortuetorche/gists{/gist_id}","starred_url":"https://api.github.com/users/tortuetorche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tortuetorche/subscriptions","organizations_url":"https://api.github.com/users/tortuetorche/orgs","repos_url":"https://api.github.com/users/tortuetorche/repos","events_url":"https://api.github.com/users/tortuetorche/events{/privacy}","received_events_url":"https://api.github.com/users/tortuetorche/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T11:59:22Z","updated_at":"2015-03-24T11:59:22Z","body":"You're debugging informations are really useful.\r\nI think I need to refactor the [Parameter](https://github.com/efficiently/authority-controller/blob/2.0/src/Efficiently/AuthorityController/Parameters.php) to handle params who contains objects like I do for string or integer params."}}