/** * Validates and stores the new User Group data. * * @author [A. Gianotto] [<snipe@snipe.net] * @see GroupsController::getCreate() * @since [v1.0] * @return Redirect */ public function postCreate() { // create a new group instance $group = new Group(); $group->name = e(Input::get('name')); $group->permissions = json_encode(Input::get('permission')); if ($group->save()) { return redirect()->to("admin/groups")->with('success', trans('admin/groups/message.success.create')); } return redirect()->back()->withInput()->withErrors($group->getErrors()); }