public function savePhotoGuest($id) { $photo = GuestHistory::find($id); $uuid = Uuid::uuid4(); $public_path = "photo/person_general/{$id}/"; $destination_path = public_path($public_path); $ext = Input::file('file')->getClientOriginalExtension(); //$jpg = ".jpg"; Input::file('file')->move($destination_path, "{$uuid}.{$ext}"); $photo->photo = "/photo/person_general/{$id}/{$uuid}.{$ext}"; $photo->save(); return $photo; }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($personId, $officeId) { $person = GuestHistory::find($personId); if ($officeId) { $addressoffice = AddressOffice::find($officeId)->delete(); return $person; } else { return null; } }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($personId, $vehicleId) { $person = GuestHistory::find($personId); if ($vehicleId) { $vehicle = Vehicle::find($vehicleId)->delete(); return $person; } else { return null; } }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($personId, $childId) { $person = GuestHistory::find($personId); if ($childId) { $datachild = DataChild::find($childId)->delete(); return $person; } else { return null; } }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($personId, $personFamilyId) { $person = GuestHistory::find($personId); if ($personFamilyId) { $personFamily = PersonFamily::find($personFamilyId)->delete(); return $person; } else { return null; } }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { return GuestHistory::find($id); }