Browse Source

Merge branch 'dev' into pre

LuluFJ.Ho 2 years ago
parent
commit
e3cb811a13

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

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'));

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

22
     // save data to db
22
     // save data to db
23
     public function insertData(StoreRequest $request)
23
     public function insertData(StoreRequest $request)
24
     {
24
     {
25
+        \Log::info(print_r($request,true));
26
+        
25
         $name = $this->safeEncrypt($request->input('name', 'name'), 'arm');
27
         $name = $this->safeEncrypt($request->input('name', 'name'), 'arm');
26
         $email = $this->safeEncrypt($request->input('email', 'email'), 'arm');
28
         $email = $this->safeEncrypt($request->input('email', 'email'), 'arm');
27
         $mobile = $this->safeEncrypt($request->input('mobile', 'mobile'), 'arm');
29
         $mobile = $this->safeEncrypt($request->input('mobile', 'mobile'), 'arm');
28
         $trackNo = $request->input('trackNo', '');
30
         $trackNo = $request->input('trackNo', '');
29
         
31
         
30
         $overOrNot = $this->seminarSignUpSv->overLimitOrNot($trackNo);
32
         $overOrNot = $this->seminarSignUpSv->overLimitOrNot($trackNo);
33
+        \Log::info($overOrNot);
34
+
31
         if ($overOrNot) {
35
         if ($overOrNot) {
32
 
36
 
33
             $this->seminarSignUpSv->insertData($name, $email, $mobile, $trackNo);
37
             $this->seminarSignUpSv->insertData($name, $email, $mobile, $trackNo);
39
         $data = [
43
         $data = [
40
             'res' => $res,
44
             'res' => $res,
41
         ];
45
         ];
42
-        dd(123);
46
+        \Log::info(print_r($res,true));
47
+        
43
         return $this->apiResponse($data);
48
         return $this->apiResponse($data);
44
     }
49
     }
45
 
50