private function _validateCustom()
 {
     //  Get Route Info
     $routeInfo = routeInfo();
     //  Get Action
     $routeName = $routeInfo["action"]["as"];
     //  Detect Custom
     if (substr($routeInfo["method"], 0, 7) != "custom_") {
         return null;
     }
     //  Get For
     $for = null;
     //  Switch
     switch ($routeInfo["method"]) {
         case "custom_index":
             $for = "list";
             break;
         case "custom_create":
             $for = "create";
             break;
         case "custom_edit":
             $for = "edit";
             break;
         case "custom_save":
             $for = "save";
             break;
         case "custom_update":
             $for = "update";
             break;
         case "custom_delete":
             $for = "delete";
             break;
     }
     //  Detect For
     if ($for) {
         //  Loop Each
         foreach (GroupItem::hasInterface()->get() as $group) {
             //  Check Valid
             if ($group->hasValidInterface()) {
                 //  Routes
                 $routes = unserialize($group->group_routes);
                 //  Get the Value
                 $val = $routes[$for];
                 //  Match
                 if ($val == $routeName) {
                     //  Store Custom Group
                     $this->customGroup = $group;
                     //  Set Page Data
                     setPageData("group", $this->customGroup);
                     return null;
                 }
             }
         }
     }
     return Redirect::route("users");
 }
 public function scopeGroupWithoutInterface($query)
 {
     $groupIds = array_values(GroupItem::hasInterface()->lists("id", "group_name"));
     if ($groupIds) {
         $query->whereNotIn("group_id", $groupIds);
     }
     return $query;
 }
register_admin_route(adminAliasPath() . 'delete_group/{id}', array('as' => 'delete_group', 'uses' => '\\Developeryamhi\\AuthModule\\ACLController@group_delete'))->before('auth');
//  ACL Permissions Routes
register_admin_route(adminAliasPath() . 'permissions', array('as' => 'permissions', 'uses' => '\\Developeryamhi\\AuthModule\\ACLController@permissions'))->before('auth');
register_admin_route(adminAliasPath() . 'create_permission', array('as' => 'create_permission', 'uses' => '\\Developeryamhi\\AuthModule\\ACLController@permission_create'))->before('auth');
register_admin_route(adminAliasPath() . 'edit_permission/{id}', array('as' => 'edit_permission', 'uses' => '\\Developeryamhi\\AuthModule\\ACLController@permission_edit'))->before('auth');
register_admin_route_post(adminAliasPath() . 'save_permission', array('as' => 'save_permission', 'uses' => '\\Developeryamhi\\AuthModule\\ACLController@permission_save'));
register_admin_route_post(adminAliasPath() . 'save_permission/{id}', array('as' => 'update_permission', 'uses' => '\\Developeryamhi\\AuthModule\\ACLController@permission_save'));
register_admin_route(adminAliasPath() . 'delete_permission/{id}', array('as' => 'delete_permission', 'uses' => '\\Developeryamhi\\AuthModule\\ACLController@permission_delete'))->before('auth');
//  AJAX Routes
register_admin_route_post(adminAliasPath() . 'user_exists', array('as' => 'user_exists', 'uses' => '\\Developeryamhi\\AuthModule\\UserController@userExists'))->before('auth');
register_admin_route_post(adminAliasPath() . 'group_exists', array('as' => 'group_exists', 'uses' => '\\Developeryamhi\\AuthModule\\ACLController@groupExists'))->before('auth');
register_admin_route_post(adminAliasPath() . 'permission_exists', array('as' => 'permission_exists', 'uses' => '\\Developeryamhi\\AuthModule\\ACLController@permissionExists'))->before('auth');
register_admin_route_post(adminAliasPath() . 'users_autocomplete', array('as' => 'users_autocomplete', 'uses' => '\\Developeryamhi\\AuthModule\\UserController@userLists'))->before('auth');
//  Check Module Migrated
if ($this->migrationsDone()) {
    //  Get Groups with Interfaces
    $groups = \Developeryamhi\AuthModule\GroupItem::hasInterface()->get();
    //  Loop Each Groups
    $groups->each(function ($group) {
        //  Check Routes Save
        if ($group->hasValidInterface()) {
            //  Register Group Routes
            register_admin_route(adminAliasPath() . $group->getRoute("list") . "/{group?}", array('as' => $group->getRoute("list"), 'uses' => '\\Developeryamhi\\AuthModule\\UserController@custom_index'))->before('auth');
            register_admin_route(adminAliasPath() . $group->getRoute("create"), array('as' => $group->getRoute("create"), 'uses' => '\\Developeryamhi\\AuthModule\\UserController@custom_create'))->before('auth');
            register_admin_route(adminAliasPath() . $group->getRoute("edit") . '/{id}', array('as' => $group->getRoute("edit"), 'uses' => '\\Developeryamhi\\AuthModule\\UserController@custom_edit'))->before('auth');
            register_admin_route_post(adminAliasPath() . $group->getRoute("save"), array('as' => $group->getRoute("save"), 'uses' => '\\Developeryamhi\\AuthModule\\UserController@custom_save'));
            register_admin_route_post(adminAliasPath() . $group->getRoute("save") . '/{id}', array('as' => $group->getRoute("update"), 'uses' => '\\Developeryamhi\\AuthModule\\UserController@custom_update'));
            register_admin_route(adminAliasPath() . $group->getRoute("delete") . '/{id}', array('as' => $group->getRoute("delete"), 'uses' => '\\Developeryamhi\\AuthModule\\UserController@custom_delete'))->before('auth');
        }
    });
}