/**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $winner = Winner::create(['user_id' => $request->user_id, 'quote' => $request->quote]);
     return redirect('cms/winner');
 }
Exemple #2
0
 public function winners()
 {
     $winners = Winner::with('user')->orderBy('id', 'desc')->take(10)->get();
     //dd($winners);
     return view('base.winners', compact('winners'));
 }