Welcome Guest, Not a member yet? Register   Sign In
Filter run order
#1

I have a filter being ran off of a route. Is there a way to make sure other filters run before the filter on the route?

PHP Code:
     public $aliases = [
        
'csrf'         => \CodeIgniter\Filters\CSRF::class,
        
'toolbar'      => \CodeIgniter\Filters\DebugToolbar::class,
        
'honeypot'     => \CodeIgniter\Filters\Honeypot::class,
        
'options'      => \App\Filters\Options::class,
        
'authenticate' => \App\Filters\AuthFilter::class,
        
'permission'   => \App\Filters\PermissionFilter::class,
    ];

   $routes->get('admin''Admin::index', ['filter' => 'permission:admin']); 

The problem I'm having is that options and authenticate filters are running after the permission filter. Is there a way to make sure my options and authenticate filters run first?

Thanks in advance.
Reply


Messages In This Thread
Filter run order - by ogomez - 09-02-2020, 06:17 PM
RE: Filter run order - by chenzen - 09-03-2020, 02:59 AM
RE: Filter run order - by Gary - 09-06-2020, 02:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB