/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store(Request $request) { $tag = new Tag(); foreach (array_keys($this->fields) as $field) { $tag->{$field} = $request->get($field); } $tag->save(); return redirect('/admin/tag')->withSuccess("The tag '{$tag->tag}' was created."); }