Beispiel #1
0
 public function store()
 {
     // dd(Input::all());
     $structure = new Structure();
     $structure->rais_soc = Input::get('rais_soc');
     \DB::transaction(function () use($structure) {
         $structure->save();
         $structure->qualites()->attach(array_unique(Input::get('qualite')));
         $structure->adresses()->attach(array_unique(Input::get('adresse')));
         $structure->telephones()->attach(array_unique(Input::get('telephone')));
         $structure->mails()->attach(array_unique(Input::get('mail')));
     });
 }