Browse Source

20220830 api

LuluFJ.Ho 2 years ago
parent
commit
ddaa0ad6cb

+ 1
- 0
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);
60
         // Route Not Found 404
61
         // Route Not Found 404
61
         if ($exception instanceof RouteNotFoundException) {
62
         if ($exception instanceof RouteNotFoundException) {
62
             return $this->apiExceptionResponse($exception, Response::HTTP_NOT_FOUND, config('response-message.router_failed'));
63
             return $this->apiExceptionResponse($exception, Response::HTTP_NOT_FOUND, config('response-message.router_failed'));

+ 1
- 3
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
-        dd(123);
26
         $name = $this->safeEncrypt($request->input('name', 'name'), 'arm');
25
         $name = $this->safeEncrypt($request->input('name', 'name'), 'arm');
27
         $email = $this->safeEncrypt($request->input('email', 'email'), 'arm');
26
         $email = $this->safeEncrypt($request->input('email', 'email'), 'arm');
28
         $mobile = $this->safeEncrypt($request->input('mobile', 'mobile'), 'arm');
27
         $mobile = $this->safeEncrypt($request->input('mobile', 'mobile'), 'arm');
46
 
45
 
47
     public function getData()
46
     public function getData()
48
     {
47
     {
49
-        // dd(123);
50
         
48
         
51
         $list = $this->seminarSignUpSv->getData();
49
         $list = $this->seminarSignUpSv->getData();
52
         
50
         
53
         $data = [
51
         $data = [
54
-            'list' => 1
52
+            'list' => $list
55
         ];
53
         ];
56
         
54
         
57
         return $this->apiResponse($data);
55
         return $this->apiResponse($data);