get(); return view('quotes', [ 'quotes' => $quotes ]); }); /** * Add a new quote */ Route::post('/quote', function (Request $request) { $validator = Validator::make($request->all(), [ 'quote' => 'required|max:1023', 'quotist' => 'required|max:63', ]); if ($validator->fails()) { return redirect('/') ->withInput() ->withErrors($validator); } $quote = new \App\Quote; $quote->quote = $request->quote; $quote->quotist = $request->quotist; $quote->save(); return redirect('/'); });