Quellcode durchsuchen

20220913 調整 if 判斷 / remove dd

LuluFJ.Ho vor 2 Jahren
Ursprung
Commit
01ef19292a
2 geänderte Dateien mit 4 neuen und 5 gelöschten Zeilen
  1. 0
    1
      app/Exceptions/Handler.php
  2. 4
    4
      app/Http/Controllers/Api/SeminarSignUpController.php

+ 0
- 1
app/Exceptions/Handler.php Datei anzeigen

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

+ 4
- 4
app/Http/Controllers/Api/SeminarSignUpController.php Datei anzeigen

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