/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id, Personne $personnes, AdresseG $adresseG, QualiteG $qualiteG, StructureG $structureG) { $personne = $personnes->edit($id); $listAdresses = $personnes->listAdresses(); $listCoordonnees = $personnes->listCoordonnees(); $adresseCommuneWith = $adresseG->adresseCommuneWith($id, $personne->adresses->first()->id); $listQualites = $personnes->listQualites(); $listStructures = $personnes->listStructures(); // return dd($personne); return view('Personnes.edit')->with('title', 'Modification d\'une fiche')->with('titre_page', 'Modification de la fiche de ' . $personne->nom_complet)->with(compact('personne'))->with(compact('listAdresses'))->with(compact('listCoordonnees'))->with(compact('adresseCommuneWith'))->with(compact('listQualites'))->with(compact('listStructures')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id, PersonneG $personnes, QualiteG $qualites, AdresseG $adresses, TelephoneG $telephones, MailG $mails, StructureG $structures) { $personne = $personnes->edit($id); $listQualites = $qualites->listForSelect(); $listAdresses = $adresses->listForSelect(); $adresseCommuneWith = $adresses->adresseCommuneWith($id, $personne->adresses->first()->id); $listTelephones = $telephones->listForSelect(); $listMails = $mails->listForSelect(); $listStructures = $structures->listForSelect(); return view('Personnes.edit')->with('title', 'Modification d\'une fiche')->with('titre_page', 'Modification de la fiche de ' . $personne->nom_complet)->with(compact('personne'))->with(compact('listQualites'))->with(compact('listAdresses'))->with(compact('adresseCommuneWith'))->with(compact('listTelephones'))->with(compact('listMails'))->with(compact('listStructures')); }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update($id, Gestion $PersonneG, EditAdresseForm $EditAdresseForm) { dd('update : ' . $id); $PersonneG->update($id); return \Redirect::action('AdresseController@index'); }