-
-
Notifications
You must be signed in to change notification settings - Fork 49
Fixed Controller inside subfolder path #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Controller inside subfolder path #79
Conversation
Hi @chrisasek , thanks for your contribution. I'll check your changes and merge it ASAP.
Thanks.
Alright.
God day @izniburak
I'm still waiting on this.
I'm very busy for this week. Probably I'll check it on weekend. Sorry for the late.
Hi @chrisasek ,
I checked the current version of the package with the controllers in the subfolder, and I have no any error. BTW, when I checked the your public project, I noticed that some of your definitions are wrong. For instance: autoloads, controllers namespace...
If you check the https://github.com/chrisasek/Dicer-mvc/blob/master/composer.json
, You can see the autoload definitions are wrong for your project. Also, If you check https://github.com/chrisasek/Dicer-mvc/blob/55233fc8225b7526e85d127a42ceb10da6ada13c/route/web.php#L7
, you can see that the TestController namespace is wrong. Because it's under the controllers/test folder. It must ve Controllers\test\TestController
.
I tried to create a new project similar with your public project and I configured all thing I mentioned above correctly, and everything seems normal.
Are you sure all definitions and configurations correct?
Please make changes to my public project, I'll use that to check, learn, and fix mine.
Thank you.
I found out that this works.
$router->controller('/food-pools', 'company.FoodPoolController');
However, I can't click on the class to access the class file, so it's not as flexible as this.
$router->controller('/food-pools', CompanyFoodPoolController::class);
My changes help, can you merge please 😌 , I'm having a hard time with the above approach.
Oh, my mistake.
Gotten it. Thanks
The problem I am trying to fix is that controllers inside a subfolder inside the controllers path aren't working.
I added an alternative search function for controllers inside the controllers' path set in the configuration for not found controllers.