public function postEdit(Request $request, $group) { if (!in_array($group, $this->manager->getConfig('exclude_groups'))) { $groups = func_get_args(); array_shift($groups); // remove the $request $group = implode('/', $groups); $name = $request->get('name'); $value = $request->get('value'); list($locale, $key) = explode('|', $name, 2); $translation = Translation::firstOrNew(['locale' => $locale, 'group' => $group, 'key' => $key]); $translation->value = (string) $value ?: null; $translation->status = Translation::STATUS_CHANGED; $translation->save(); return array('status' => 'ok'); } }