0

I am making a modulized app with laravel 5.0 and for this , I created a serviceProvider that's called ModuleServiceProvider , and for including routes of each module , in Boot function of ModuleServiceProvider , I wrote include base_app()."/app/Modules/$ModuleName/routes.php";. Now , my question is this: when I enter the module page address in browser it has returned errors such as NotFoundHttpException in Controller.php line 259: Controller method not found. . I know that it is caused by / route in Http/routes.php How can I fixed it ?

sorry for weak English.

Abolfazl
  • 103
  • 1
  • 1
  • 10

1 Answers1

0

I found out that when you define routes on /* subaddress , for correct working in the / route (in controller method such as Route::Controller('/','IndexController')) , it should enter after all routes. on the other hand when you include some routes from service Providers or another files , the included routes would be processed after Http/Routes. for solving this problem we should change our routing writing for Root (/) route and rewrite it to a regular route::get method.

sorry for weak English. Thanks all

Abolfazl
  • 103
  • 1
  • 1
  • 10