/** * @return mixed */ private function getCurrentUserId() { if (!$this->current_user_id) { $this->current_user_id = $this->users->currentUser()->id; } return $this->current_user_id; }
/** * @param $group_id * @return mixed */ public function postRemoveGroup($group_id) { try { $group = $this->manager->getGroupById($group_id); $group_name = $group->name; $this->manager->removeGroupById($group_id); return Redirect::to(Coanda::adminUrl('users'))->with('group_deleted', true)->with('group_name', $group_name); } catch (GroupNotFound $exception) { return Redirect::to(Coanda::adminUrl('users')); } }
/** * @param $for * @param $for_id * @return mixed */ public function users($for, $for_id) { return $this->user_manager->getByIds($this->model->whereFor($for)->whereForId($for_id)->groupBy('user_id')->lists('user_id')); }