/**
  * Remove the specified resource from storage.
  *
  * @param  \Illuminate\Http\Request
  * @param  \App\Steminar $steminar
  * @return \Illuminate\Http\Response
  */
 public function destroy(Request $request, Steminar $steminar)
 {
     if ($request->ajax()) {
         $steminar->delete();
         return;
     }
     return redirect(action('SteminarsController@index'));
 }
Esempio n. 2
0
 public function events()
 {
     $events = Event::latest('date')->get();
     $steminars = Steminar::latest('date')->get();
     return view('main.events', compact('events', 'steminars'));
 }