Skip to content
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

Filter in the router #1315

Closed
demortx opened this issue Oct 15, 2018 · 2 comments
Closed

Filter in the router #1315

demortx opened this issue Oct 15, 2018 · 2 comments
Labels
enhancement PRs that improve existing functionalities
Milestone

Comments

@demortx
Copy link

demortx commented Oct 15, 2018

$routes->group('System',['namespace' => 'App\API\v1\System', 'filter' => 'api-guard'] , function($routes)

The api-guard filter has 2 methods before and after, for my ap it is necessary to log what happened during the request, and if we set the fitr through a router, then the after method simply does not work.

In the documentation about this there is no information, because of this, it was added that this is a mistake.

CodeIgniter 4 version
4.0.0-alpha.1

Context

  • OS: ubuntu16.04.1
  • PHP version 7.2.8-1
@lonnieezell
Copy link
Member

It could be worded better, but the docs do say "This will always run the filter before the controller".

Currently, it only supports running the before filter, when defined that way. Definitely open if you want to submit a PR for that!

@jim-parry jim-parry added the enhancement PRs that improve existing functionalities label Oct 19, 2018
@jim-parry jim-parry added this to the 4.0.1? milestone Oct 19, 2018
@lonnieezell
Copy link
Member

lonnieezell commented Oct 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that improve existing functionalities
Projects
None yet
Development

No branches or pull requests

3 participants