/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $atentionType = AtentionType::find($id); $atentionType->delete(); Session::flash('message', 'Tipo de atención eliminado correctamente'); return Redirect::to('/atentionType'); }
public function add($petId) { $pet = Pet::find($petId); $client = Client::find($pet->client_id); $breed = Breed::find($pet->breed_id); $specie = Species::find($breed->species_id); $atentionsType = AtentionType::lists('description', 'id')->all(); $date = UtilsController::calculateAge($pet->birth_date); return view('atention.create', compact('pet', 'client', 'breed', 'specie', 'atentionsType', 'date')); }