Exemplo n.º 1
0
 public function generateValidateEmail(UserService $user, $user_id)
 {
     try {
         $verification_code = Hash::make($user_id . '-' . date('Y-m-d H:i:s') . '-' . str_random(10) . '-' . uniqid());
         if ($user->sendVerificationEmail($user_id, $verification_code)) {
             return $this->json_response->success([]);
         }
         return $this->json_response->error([]);
     } catch (Exception $e) {
         return $this->json_response->error(['error' => $e->getMessage()]);
     }
 }