/** * Display a listing of the resource. * * @return Response */ public function index() { $matchs = Encuentro::orderBy('created_at', 'DESC')->whereBetween('created_at', [Carbon::today(), Carbon::today()->addDay(1)])->get(); $blogs = Blog::orderBy('created_at', 'DESC')->paginate(2); return view('Site.index', compact('blogs', 'matchs')); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $canal = Encuentro::find($id); $delete = $canal->delete(); if ($delete) { $message = 'Match Deleted succesfully'; } else { $message = 'Match It could not be deleted '; } \Session::flash('message', $message); return redirect()->route('admin.match.index'); }