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

About Filters matching rules #908

Closed
bangbangda opened this issue Jan 17, 2018 · 1 comment
Closed

About Filters matching rules #908

bangbangda opened this issue Jan 17, 2018 · 1 comment

Comments

@bangbangda
Copy link
Contributor

bangbangda commented Jan 17, 2018

Have different views on the current match rules,
for example:
public filters = [ 'foo' => ['before' => ['admin/*']] ];

URI is admin/show , foo filter is run.
URI is admin/102/edit foo filter is run.
but.
URI is admin ,foo filter is not run.

if the routes is $routes->resource('admin'),
then filters is set 'foo' => ['before' => ['admin/*','admin']]

i think 'foo' => ['before' => ['admin/*']] is ok.

Is this okay.what do you think?

@lonnieezell
Copy link
Member

If you want it to run on admin also, just change the rule to 'foo' => ['before' => ['admin*']] and it should work for all of it. Note the lack of trailing slash there.

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

No branches or pull requests

2 participants