/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $id = (int) $id; $categories = Category::allName(); $expenditure = Expenditure::find($id); return view('expenditure.edit', compact('categories', 'expenditure')); }