Completed
Push — api/develop ( fe7067...49dd48 )
by Bertrand
06:39
created
app/Http/routes.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 $api = app(Router::class);
6 6
 
7 7
 // Version 1 of our API
8
-$api->version('v1', function (Router $api) {
8
+$api->version('v1', function(Router $api) {
9 9
 
10 10
     // Set our namespace for the underlying routes
11 11
     $api->group([
@@ -15,40 +15,40 @@  discard block
 block discarded – undo
15 15
             'api.throttle',
16 16
         ],
17 17
         'limit'   => 200,
18
-        'expires' => 5, ], function (Router $api) {
18
+        'expires' => 5, ], function(Router $api) {
19 19
 
20 20
         // Login route
21
-        $api->post('login', 'Auth\AuthController@authenticate');                                            // docs done
21
+        $api->post('login', 'Auth\AuthController@authenticate'); // docs done
22 22
         $api->post('register', 'Auth\AuthController@register');
23 23
 
24 24
         $api->get('auth/refresh', 'Auth\AuthController@token');
25 25
 
26 26
         // All routes in here are protected and thus need a valid token
27
-        $api->group(['protected' => true, 'middleware' => 'jwt.auth'], function (Router $api) {
27
+        $api->group(['protected' => true, 'middleware' => 'jwt.auth'], function(Router $api) {
28 28
 
29 29
             // Authentication
30
-            $api->get('logout', 'Auth\AuthController@logout');                                              // docs done
30
+            $api->get('logout', 'Auth\AuthController@logout'); // docs done
31 31
             $api->get('users/me', 'Auth\AuthController@me');
32 32
             $api->post('sidebar', 'Auth\AuthController@sidebar');
33 33
 
34 34
             // Profile
35
-            $api->group(['prefix' => 'profile', 'namespace' => 'Profile'], function (Router $api) {
36
-                $api->patch('personal-details', 'PersonalDetailsController@update');                        // docs done
35
+            $api->group(['prefix' => 'profile', 'namespace' => 'Profile'], function(Router $api) {
36
+                $api->patch('personal-details', 'PersonalDetailsController@update'); // docs done
37 37
 
38
-                $api->patch('contact-details', 'PersonalDetailsController@update');                         // docs done
38
+                $api->patch('contact-details', 'PersonalDetailsController@update'); // docs done
39 39
 
40
-                $api->post('emergency-contacts', 'EmergencyContactsController@store');                      // docs done
41
-                $api->patch('emergency-contacts', 'EmergencyContactsController@update');                    // docs done
42
-                $api->delete('emergency-contacts', 'EmergencyContactsController@destroy');                  // docs done
40
+                $api->post('emergency-contacts', 'EmergencyContactsController@store'); // docs done
41
+                $api->patch('emergency-contacts', 'EmergencyContactsController@update'); // docs done
42
+                $api->delete('emergency-contacts', 'EmergencyContactsController@destroy'); // docs done
43 43
 
44
-                $api->post('dependents', 'DependentsController@store');                                     // docs done
45
-                $api->patch('dependents', 'DependentsController@update');                                   // docs done
46
-                $api->delete('dependents', 'DependentsController@destroy');                                 // docs done
44
+                $api->post('dependents', 'DependentsController@store'); // docs done
45
+                $api->patch('dependents', 'DependentsController@update'); // docs done
46
+                $api->delete('dependents', 'DependentsController@destroy'); // docs done
47 47
 
48 48
                 $api->patch('job', 'JobController@update');
49 49
                 $api->delete('job', 'JobController@destroy');
50 50
 
51
-                $api->group(['prefix' => 'qualifications'], function (Router $api) {
51
+                $api->group(['prefix' => 'qualifications'], function(Router $api) {
52 52
                     $api->post('work-experiences', 'QualificationsController@storeWorkExperience');
53 53
                     $api->delete('work-experiences', 'QualificationsController@destroyWorkExperience');
54 54
                     $api->patch('work-experiences', 'QualificationsController@updateWorkExperience');
@@ -64,21 +64,21 @@  discard block
 block discarded – undo
64 64
             });
65 65
 
66 66
             // Employee
67
-            $api->group(['prefix' => 'employee'], function (Router $api) {
67
+            $api->group(['prefix' => 'employee'], function(Router $api) {
68 68
                 $api->post('get-by-employee-id', 'EmployeeController@getByEmployeeId');
69 69
             });
70 70
 
71 71
             // PIM
72
-            $api->group(['prefix' => 'pim', 'namespace' => 'PIM'], function (Router $api) {
72
+            $api->group(['prefix' => 'pim', 'namespace' => 'PIM'], function(Router $api) {
73 73
                 $api->get('employee-list', 'EmployeeListController@index');
74 74
 
75 75
                 // Configuration
76
-                $api->group(['prefix' => 'configuration', 'namespace' => 'Configuration'], function (Router $api) {
76
+                $api->group(['prefix' => 'configuration', 'namespace' => 'Configuration'], function(Router $api) {
77 77
 
78
-                    $api->get('termination-reasons', 'TerminationReasonsController@index');                  // docs done
79
-                    $api->post('termination-reasons', 'TerminationReasonsController@store');                 // docs done
80
-                    $api->patch('termination-reasons', 'TerminationReasonsController@update');               // docs done
81
-                    $api->delete('termination-reasons', 'TerminationReasonsController@destroy');             // docs done
78
+                    $api->get('termination-reasons', 'TerminationReasonsController@index'); // docs done
79
+                    $api->post('termination-reasons', 'TerminationReasonsController@store'); // docs done
80
+                    $api->patch('termination-reasons', 'TerminationReasonsController@update'); // docs done
81
+                    $api->delete('termination-reasons', 'TerminationReasonsController@destroy'); // docs done
82 82
 
83 83
                     $api->get('custom-field-sections', 'CustomFieldsController@index');
84 84
                     $api->post('custom-field-sections', 'CustomFieldsController@store');
@@ -94,50 +94,50 @@  discard block
 block discarded – undo
94 94
             });
95 95
 
96 96
             // Admin
97
-            $api->group(['prefix' => 'admin', 'namespace' => 'Admin'], function (Router $api) {
97
+            $api->group(['prefix' => 'admin', 'namespace' => 'Admin'], function(Router $api) {
98 98
 
99 99
                 // Job
100
-                $api->group(['prefix' => 'job', 'namespace' => 'Job'], function (Router $api) {
101
-                    $api->get('titles', 'JobTitlesController@index');                                       // docs done
102
-                    $api->post('titles', 'JobTitlesController@store');                                      // docs done
103
-                    $api->patch('titles', 'JobTitlesController@update');                                    // docs done
104
-                    $api->delete('titles', 'JobTitlesController@destroy');                                  // docs done
105
-
106
-                    $api->get('employment-status', 'EmploymentStatusController@index');                     // docs done
107
-                    $api->post('employment-status', 'EmploymentStatusController@store');                    // docs done
108
-                    $api->patch('employment-status', 'EmploymentStatusController@update');                  // docs done
109
-                    $api->delete('employment-status', 'EmploymentStatusController@destroy');                // docs done
110
-
111
-                    $api->get('pay-grades', 'PayGradesController@index');                                   // docs done
112
-                    $api->post('pay-grades', 'PayGradesController@store');                                  // docs done
113
-                    $api->patch('pay-grades', 'PayGradesController@update');                                // docs done
114
-                    $api->delete('pay-grades', 'PayGradesController@destroy');                              // docs done
100
+                $api->group(['prefix' => 'job', 'namespace' => 'Job'], function(Router $api) {
101
+                    $api->get('titles', 'JobTitlesController@index'); // docs done
102
+                    $api->post('titles', 'JobTitlesController@store'); // docs done
103
+                    $api->patch('titles', 'JobTitlesController@update'); // docs done
104
+                    $api->delete('titles', 'JobTitlesController@destroy'); // docs done
105
+
106
+                    $api->get('employment-status', 'EmploymentStatusController@index'); // docs done
107
+                    $api->post('employment-status', 'EmploymentStatusController@store'); // docs done
108
+                    $api->patch('employment-status', 'EmploymentStatusController@update'); // docs done
109
+                    $api->delete('employment-status', 'EmploymentStatusController@destroy'); // docs done
110
+
111
+                    $api->get('pay-grades', 'PayGradesController@index'); // docs done
112
+                    $api->post('pay-grades', 'PayGradesController@store'); // docs done
113
+                    $api->patch('pay-grades', 'PayGradesController@update'); // docs done
114
+                    $api->delete('pay-grades', 'PayGradesController@destroy'); // docs done
115 115
                 });
116 116
 
117 117
                 // Qualification
118
-                $api->group(['prefix' => 'qualifications', 'namespace' => 'Qualifications'], function (Router $api) {
119
-                    $api->get('educations', 'EducationsController@index');                                  // docs done
120
-                    $api->post('educations', 'EducationsController@store');                                 // docs done
121
-                    $api->patch('educations', 'EducationsController@update');                               // docs done
122
-                    $api->delete('educations', 'EducationsController@destroy');                             // docs done
118
+                $api->group(['prefix' => 'qualifications', 'namespace' => 'Qualifications'], function(Router $api) {
119
+                    $api->get('educations', 'EducationsController@index'); // docs done
120
+                    $api->post('educations', 'EducationsController@store'); // docs done
121
+                    $api->patch('educations', 'EducationsController@update'); // docs done
122
+                    $api->delete('educations', 'EducationsController@destroy'); // docs done
123 123
                 });
124 124
             });
125 125
 
126 126
             // Chosen
127
-            $api->get('cities', 'LookupTableController@cities');                                            // docs done
128
-            $api->get('countries', 'LookupTableController@countries');                                      // docs done
129
-            $api->get('departments', 'LookupTableController@departments');                                  // docs done
130
-            $api->get('education-levels', 'LookupTableController@educationLevels');                         // docs done
131
-            $api->get('employment-statuses', 'LookupTableController@employmentStatuses');                   // docs done
132
-            $api->get('job-titles', 'LookupTableController@jobTitles');                                     // docs done
133
-            $api->get('locations', 'LookupTableController@locations');                                      // docs done
134
-            $api->get('marital-statuses', 'LookupTableController@maritalStatuses');                         // docs done
135
-            $api->get('screens', 'LookupTableController@screens');                                          // docs done
136
-            $api->get('types', 'LookupTableController@types');                                              // docs done
137
-            $api->get('nationalities', 'LookupTableController@nationalities');                              // docs done
138
-            $api->get('provinces', 'LookupTableController@provinces');                                      // docs done
139
-            $api->get('relationships', 'LookupTableController@relationships');                              // docs done
140
-            $api->get('skills', 'LookupTableController@skills');                                            // docs done
127
+            $api->get('cities', 'LookupTableController@cities'); // docs done
128
+            $api->get('countries', 'LookupTableController@countries'); // docs done
129
+            $api->get('departments', 'LookupTableController@departments'); // docs done
130
+            $api->get('education-levels', 'LookupTableController@educationLevels'); // docs done
131
+            $api->get('employment-statuses', 'LookupTableController@employmentStatuses'); // docs done
132
+            $api->get('job-titles', 'LookupTableController@jobTitles'); // docs done
133
+            $api->get('locations', 'LookupTableController@locations'); // docs done
134
+            $api->get('marital-statuses', 'LookupTableController@maritalStatuses'); // docs done
135
+            $api->get('screens', 'LookupTableController@screens'); // docs done
136
+            $api->get('types', 'LookupTableController@types'); // docs done
137
+            $api->get('nationalities', 'LookupTableController@nationalities'); // docs done
138
+            $api->get('provinces', 'LookupTableController@provinces'); // docs done
139
+            $api->get('relationships', 'LookupTableController@relationships'); // docs done
140
+            $api->get('skills', 'LookupTableController@skills'); // docs done
141 141
         });
142 142
 
143 143
     });
Please login to merge, or discard this patch.