/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function book(Rental $id) { $rental = Rental::find(Input::get('id')); if ($rental) { return View('store.booking')->with('rental', Rental::find(Input::get('id'))); } return Redirect::to('/')->with('message', 'invalid rental id, please try again'); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $rental = Rental::find(Input::get('id')); if ($rental) { file::delete('public/' . $rental->image); $rental->delete(); return Redirect('admin/rentals')->with('message', 'Rental Deleted'); } return Redirect('admin/rentals')->with('message', 'Something went wrong, please try again'); }