예제 #1
0
 public function passwordSend($data)
 {
     try {
         $info = ['email' => $data['email'], 'name' => $data['name'], 'password' => $data['password']];
         $this->emailService->sendCreatePassword($info);
         //Session::put('success', 'Contato enviado com sucesso!');
     } catch (\Exception $e) {
         throw $e;
     }
 }
 public function returnContact($data, $id)
 {
     \DB::beginTransaction();
     try {
         $contact = $this->repository->find($data['id']);
         $info = ['email' => $contact->email, 'name' => $contact->name, 'return' => $data['return']];
         $this->emailService->sendEmailContact($info);
         $data['status'] = 1;
         $data['user_id'] = auth()->user()->id;
         $this->repository->update($data, $id);
         Session::put('success', 'Contato enviado com sucesso!');
         \DB::commit();
     } catch (\Exception $e) {
         \DB::rollback();
         throw $e;
     }
 }