/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $spares = Spares::find($id); $spares->delete(); // redirect Session::flash('message', 'Successfully deleted the spares!'); return Redirect::to('spares'); }
public function sparedetail($id) { if ($id) { $spares = Spares::find($id); // show the view and pass the spares to it return View::make('spares.sparedetail')->with('spares', $spares); } }