Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
chrisasek wants to merge 1 commit into izniburak:master
base: master
Choose a base branch
Loading
from chrisasek:use-subfolder-controller-path

Conversation

Copy link

@chrisasek chrisasek commented Nov 14, 2024

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.

Copy link
Owner

Hi @chrisasek , thanks for your contribution. I'll check your changes and merge it ASAP.

Thanks.

Copy link
Author

Alright.

Copy link
Author

God day @izniburak

I'm still waiting on this.

Copy link
Owner

I'm very busy for this week. Probably I'll check it on weekend. Sorry for the late.

Copy link
Author

chrisasek commented Nov 21, 2024 via email

Alright
...
On Thu, Nov 21, 2024, 11:52 PM İzni Burak Demirtaş ***@***.***> wrote: I'm very busy for this week. Probably I'll check it on weekend. Sorry for the late. — Reply to this email directly, view it on GitHub <#79 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2JGIH3RKXZZND6NAHXWQT2BZP2RAVCNFSM6AAAAABRYZJI66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJSGUYTOOJTGA> . You are receiving this because you were mentioned.Message ID: ***@***.***>

Copy link
Owner

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?

Copy link
Author

chrisasek commented Dec 1, 2024
edited
Loading

Please make changes to my public project, I'll use that to check, learn, and fix mine.

Thank you.

Copy link
Author

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.

Copy link
Author

chrisasek commented Mar 1, 2025
edited
Loading

Oh, my mistake.

Gotten it. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /