Is there anything to do with route binding, I have category in another Module too and when I edit category of my questionnaire module, bind function for another module get called.
Bind in Questionnaire
$router->group(['prefix' =>'/questionnaire'], function (Router $router) {
$router->bind('category', function ($id) {
// Not called
return app('Modules\Questionnaire\Repositories\CategoryRepository')->find($id);
});
Bind in Dosdonts
$router->group(['prefix' => '/dosdonts'], function (Router $router) {
$router->bind('category', function ($id) {
// This get called
return app('Modules\Dosdonts\Repositories\CategoryRepository')->find($id);
});
Renaming category may get it resolved but what would be the better approach?