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;
     }
 }
 public function store($request)
 {
     $data = $request->all();
     if (empty($request['image'])) {
         $this->repository->create($data);
         Session::put('success', 'Contato enviado com sucesso!');
     } else {
         \DB::beginTransaction();
         try {
             $file = $request->file('image');
             $data['extension'] = $file->getClientOriginalExtension();
             $data['file'] = $file->getClientOriginalName();
             $extension = $file->getClientOriginalExtension();
             $id = $this->repository->create($data);
             Storage::disk('local_contacts')->put($id['id'] . '.' . $extension, File::get($file));
             \DB::commit();
         } catch (\Exception $e) {
             \DB::rollback();
             throw $e;
         }
         Session::put('success', 'Contato enviado com sucesso!');
     }
 }