middleware('auth'); } /** * Add or edit a node */ public function add_edit(Request $request,Domain $o) { if ($request->post()) { foreach (['name','dnsdomain','active','notes'] as $key) $o->{$key} = $request->post($key); $o->active = TRUE; $o->save(); return redirect()->action([self::class,'home']); } return view('domain.addedit') ->with('o',$o); } public function home() { return view('domain.home'); } }