Skip to content

Update Core/Route.php #75

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

Closed
wants to merge 1 commit into from
Closed

Update Core/Route.php #75

wants to merge 1 commit into from

Conversation

alperen-ozdemir
Copy link

@alperen-ozdemir alperen-ozdemir commented Dec 2, 2020

I have added single line to check if the url ends with '/' or not. If it is not then line appends '/' at the end. In this way, there is no need to add 2 route with slashed and nonslashed one.

They both identical and one of them work for 'echo' and 'echo/' route.
$router->add('echo', ['controller' => 'Home', 'action' => 'echo']);
$router->add('echo/', ['controller' => 'Home', 'action' => 'echo']);

Fix Slash at the End of the URL.
@daveh
Copy link
Owner

daveh commented Dec 2, 2020

Thank you for the request - this is something that I will be including in an updated version of the framework, but for now I don't want to change it so that it's in line with the associated course. Thanks anyway

@alperen-ozdemir
Copy link
Author

alperen-ozdemir commented Dec 2, 2020

Then you may close the request. I am looking forward to the new version. Thank you.

@daveh daveh closed this Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants