public function enregistrerCompte(UserCreateRequest $request, PhotoGestion $photoGestion)
 {
     if ($photoGestion->save($request->file('shopPicture'))) {
         $input = $request->all();
         $input['shopPicture'] = $photoGestion->getPictureLink();
         /*return 'Le formulaire est bien rempli avec : 
         		nom = '.$input->input('name').'
         		email = '.$input->input('email').'
         		shopPicture = '.$input['shopPicture'].'
         		photo = '.$photoGestion->getPictureLink().'
         		tel = '.$input->input('phone'); */
         $user = $this->userRepository->store($input);
         $user['shopPicture'] = $photoGestion->getPictureLink();
         return redirect('post')->withOk("Inscription réussie");
     }
     /*$user = $this->userRepository->store($request->all());
     		return redirect('user')->withOk("L'utilisateur " . $user->name . " a été créé.");*/
 }
Пример #2
0
 public function store(PostRequest $request, PhotoGestion $photoGestion)
 {
     if ($photoGestion->save($request->file('photo'))) {
         $input = $request->all();
         $input['photo'] = $photoGestion->getPictureLink();
         $inputs = array_merge($input, ['user_id' => $request->user()->id]);
         /*return 'Le formulaire est bien rempli avec : 
         		nom = '.$inputs['user_id'].'
         		type = '.$inputs['type'].'
         		postPicture = '.$inputs['photo'].'
         		photo = '.$photoGestion->getPictureLink().'
         		etat = '.$inputs['etat']; */
         $posts = $this->postRepository->store($inputs);
         //$posts['photo'] = $photoGestion->getPictureLink();
         return redirect(route('post.index'));
     }
     //$inputs = array_merge($request->all(), ['user_id' => $request->user()->id]);
     //$this->postRepository->store($inputs);
     //return redirect(route('post.index'));
 }
Пример #3
0
 public function updateProfil(UserUpdateRequest $request, $id, PhotoGestion $photoGestion)
 {
     if ($photoGestion->save($request->file('shopPicture'))) {
         $input = $request->all();
         $input['shopPicture'] = $photoGestion->getPictureLink();
         $this->setAdmin($request);
         $user = $request->all();
         //var_dump($user);
         $user['shopPicture'] = $photoGestion->getPictureLink();
         //var_dump($user);
         $this->userRepository->update($id, $user);
     }
     return redirect('post')->withOk("L'utilisateur " . $request->input('name') . " a été modifié.");
 }