Browse Source

20220913 調整 if 判斷 / remove dd

LuluFJ.Ho 2 years ago
parent
commit
01ef19292a

+ 0
- 1
app/Exceptions/Handler.php View File

@@ -57,7 +57,6 @@ class Handler extends ExceptionHandler
57 57
 
58 58
     public function handleApiException(Throwable $exception)
59 59
     { 
60
-        // dd($exception);
61 60
         // Route Not Found 404
62 61
         if ($exception instanceof RouteNotFoundException) {
63 62
             return $this->apiExceptionResponse($exception, Response::HTTP_NOT_FOUND, config('response-message.router_failed'));

+ 4
- 4
app/Http/Controllers/Api/SeminarSignUpController.php View File

@@ -173,7 +173,7 @@ class SeminarSignUpController extends ApiController
173 173
     {
174 174
         $data = array('name'=>$firstName);
175 175
 
176
-        if (!empty($backupEmail)) {
176
+        if ($backupEmail) {
177 177
             \Mail::send(['text'=>'mailTW'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
178 178
                 $message->to($companyEmail, $firstName)->subject('報名成功');       // Registration is complete
179 179
                 $message->cc($backupEmail, $firstName)->subject('報名成功');       // Registration is complete
@@ -191,7 +191,7 @@ class SeminarSignUpController extends ApiController
191 191
     {
192 192
         $data = array('name'=>$firstName);
193 193
 
194
-        if (!empty($backupEmail)) {
194
+        if ($backupEmail) {
195 195
             \Mail::send(['text'=>'mailJP'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
196 196
                 $message->to($companyEmail, $firstName)->subject('登録完了');
197 197
                 $message->cc($backupEmail, $firstName)->subject('登録完了');
@@ -209,7 +209,7 @@ class SeminarSignUpController extends ApiController
209 209
     {
210 210
         $data = array('name'=>$firstName);
211 211
 
212
-        if (!empty($backupEmail)) {
212
+        if ($backupEmail) {
213 213
             \Mail::send(['text'=>'mailKR'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
214 214
                 $message->to($companyEmail, $firstName)->subject('등록이 완료되었습니다');
215 215
                 $message->cc($backupEmail, $firstName)->subject('등록이 완료되었습니다');
@@ -227,7 +227,7 @@ class SeminarSignUpController extends ApiController
227 227
     {
228 228
         $data = array('name'=>$firstName);
229 229
 
230
-        if (!empty($backupEmail)) {
230
+        if ($backupEmail) {
231 231
             \Mail::send(['text'=>'mailEN'], $data, function($message) use ($companyEmail, $firstName, $backupEmail) {
232 232
                 $message->to($companyEmail, $firstName)->subject('Registration is complete');
233 233
                 $message->cc($backupEmail, $firstName)->subject('Registration is complete');