/** * Store a newly created resource in storage. * * @param GuestbookRequest|Request $request * @return \Illuminate\Http\Response */ public function store(GuestbookRequest $request) { Guestbook::create($request->all()); return redirect('guestbook')->withSuccess('New Messages Successfully Created.'); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $guestbook = Guestbook::create(['name' => $request->name, 'content' => $request->content]); return redirect()->to('guestbook'); }