/** * Destroy the given task. * * @param Request $request * @param Task $task * @return Response */ public function destroy(Request $request, Counter $counter) { $counter->delete(); $request->session()->flash('alert-success', 'Counter was successful deleted!'); $page = $request->session()->get('counter_page'); return redirect('/counters?page=' . $page); }