Closed Steevoh120 closed 2 years ago
https://github.com/thecodeholic/tc-php-mvc-core/blob/master/Router.php#L53 is causing this. But I don't think that this is an issue.
Is there a way to stop this from happenning?
Is there a way to stop this from happenning?
Sure! In your framework, just remove line 53 from Router.php
.
Is there a way to stop this from happenning?
Sure! In your framework, just remove line 53 from
Router.php
.
when I remove it $app->router->get('/users/{id}', [Users::class, 'users']); now throws 404 not found
Is there a way to stop this from happenning?
Sure! In your framework, just remove line 53 from
Router.php
.when I remove it $app->router->get('/users/{id}', [Users::class, 'users']); now throws 404 not found
Hmm. Then you can edit line 53 like this: $url = ltrim($url, '/');
Is there a way to stop this from happenning?
Sure! In your framework, just remove line 53 from
Router.php
.when I remove it $app->router->get('/users/{id}', [Users::class, 'users']); now throws 404 not found
Hmm. Then you can edit line 53 like this:
$url = ltrim($url, '/');
Yes, This is it. Thank you
Is there a way to stop this from happenning?
Sure! In your framework, just remove line 53 from
Router.php
.when I remove it $app->router->get('/users/{id}', [Users::class, 'users']); now throws 404 not found
Hmm. Then you can edit line 53 like this:
$url = ltrim($url, '/');
Yes, This is it. Thank you
Most welcome.
I defined a route as $app->router->get('/users', [Users::class, 'users']); , However from my browser '/users/ returns the same as '/users' while this should throw 404 not Found. What causes this?