Welcome Guest, Not a member yet? Register   Sign In
Problem with filters
#1

(This post was last modified: 09-14-2023, 03:05 PM by motoroller.)

Hello everyone, i use few filters in project, one global and one in some routers

In Config/Filters i have global
PHP Code:
public array $globals = [

        'before' => [

            'isLoggedIn' => [

                'except' => [
                    'admin*'
]

]

]; 

public bool $multipleFilters = true;

When i load this: $routes->get('/', [Start::class, 'Index'], [ 'filter' => 'isBlocked' ]);  router my local "isBlocked" filter is working, but my global filter "isLoggedIn" is not execute why? Before is working properly but after update is not(

Then i have added to Filters

PHP Code:
public array $filters = [
        'isBlocked' => ['before' => ['start']]
    ]; 
but filters "isBlocked" is not working as well(
Reply
#2

(This post was last modified: 09-14-2023, 11:17 PM by sammyskills.)

Check the filters using your terminal:

Code:
php spark filter:check get /

See https://codeigniter4.github.io/CodeIgnit...ng-filters
Reply




Theme © iAndrew 2016 - Forum software by © MyBB