I’m trying to restrict users to access the administration area using Shield package Authorization group. everything works fine but it redirects to index page if the user not in group.
How i can redirect them to seperate page instead of redirecting to the index page ?
My code looks like :
$routes->group("admin", ["namespace" => "AdminControllers", "filter" => "group:admin"], static function ($routes) {
$routes->get('entities', 'Entities::index');
$routes->post('entities/create', 'Entities::create');
});