Myth Auth LoginFilter Problem |
i have applied this filter to restrict access to a certain url in config/routes.php
PHP Code: $routes->get('user/profile', 'User::profile', ['filter' => 'role:User']); when i log in as another role user for example admin and i try to access the page /user/profile i get the above error Myth\Auth\Exceptions\PermissionException You do not have sufficient permissions to access that page. however I want to redirect them to the main url i could achieve it using $this->restrictToGroups('User','dashboard' ); but still dont know how to do using filters |
Welcome Guest, Not a member yet? Register Sign In |