Пример #1
0
 public function getIndex()
 {
     $lastWebinar = Webinar::where('date_time', '<', Carbon::now())->orderBy('id', 'desc')->first();
     $nextWebinars = Webinar::where('date_time', '>', Carbon::now())->get();
     $groups = FacebookGroup::all();
     return view('index/home', ['last_webinar' => $lastWebinar, 'next_webinars' => $nextWebinars, 'groups' => $groups]);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy(FacebookGroup $fbgroup)
 {
     $fbgroup->delete();
     return redirect('/fbgroup');
 }