src/components/Auth.php
public function getDatabaseAuths()
    {
        // define response structure of array
        $data = [
            'routes' => [],
            'apis' => [],
        ];
        // get all auth data
        foreach ((new Query())->select('*')->from('{{%admin_auth}}')->all() as $item) {
            // allocate if its an api or route. More differences?
            if (empty($item['api'])) {
                $data['routes'][] = $item;
            } else {
                $data['apis'][] = $item;
            }
        }

        return $data;
    }
public function getDatabaseAuths()
    {
        // define response structure of array
        $data = [
            'routes' => [],
            'apis' => [],
        ];
        // get all auth data
        foreach ((new Query())->select('*')->from('{{%admin_auth}}')->all() as $item) {
            // allocate if its an api or route. More differences?
            if (empty($item['api'])) {
                $data['routes'][] = $item;
            } else {
                $data['apis'][] = $item;
            }
        }

        return $data;
    }
public function getDatabaseAuths ( ) { // define response structure of array $ data = [ 'routes' => [ ] , 'apis' => [ ] , ] ; // get all auth data foreach ( ( new Query ( ) ) -> select ( '*' ) -> from ( '{{%admin_auth}}' ) -> all ( ) as $ item ) { // allocate if its an api or route. More differences? if ( empty ( $ item [ 'api' ] ) ) { $ data [ 'routes' ] [ ] = $ item ; } else { $ data [ 'apis' ] [ ] = $ item ; } } return $ data ; }
Returns the current available auth rules inside the admin_auth table splied into routes and apis.

@return array
Returns the current available auth rules inside the admin_auth table splied into routes and apis .