Welcome Guest, Not a member yet? Register   Sign In
How To Add Filter On Specified HTTP Method and Controller in Routes.php?
#1

What I've tried to achieve is add filter on specified http method and controller. Like:

PHP Code:
$rotues->get('/''Home::index', ['filter' => 'user']);
$rotues->post('/''Home::new', ['filter' => 'admin']); 

But when I call the HTTP GET method, the filter is always use admin while I specified that to use user. How could I achieve this? Thanks.
Reply


Messages In This Thread
How To Add Filter On Specified HTTP Method and Controller in Routes.php? - by simonickalexs - 03-06-2021, 03:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB