Нема описа
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?php
  2. use Illuminate\Http\Request;
  3. use Illuminate\Support\Facades\Route;
  4. /*
  5. |--------------------------------------------------------------------------
  6. | API Routes
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here is where you can register API routes for your application. These
  10. | routes are loaded by the RouteServiceProvider within a group which
  11. | is assigned the "api" middleware group. Enjoy building your API!
  12. |
  13. */
  14. // Start User
  15. Route::group(
  16. [
  17. 'prefix' => 'user',
  18. 'as' => 'user.',
  19. ],
  20. function () {
  21. Route::get('/all', ['as' => 'index', 'uses' => 'UserController@getAll']);
  22. Route::get('/find/{data_id}', ['as' => 'find', 'uses' => 'UserController@getSingle']);
  23. Route::post('/login', ['as' => 'login', 'uses' => 'UserController@postLogin']);
  24. Route::post('/register', ['as' => 'register', 'uses' => 'UserController@postRegister']);
  25. Route::post('/forgot-password', ['as' => 'forgotpassword', 'uses' => 'UserController@postForgotPassword']);
  26. Route::post('/reset-password', ['as' => 'resetpassword', 'uses' => 'UserController@postResetPassword']);
  27. Route::post('/create-profile', ['as' => 'createprofile', 'uses' => 'UserController@postCreateProfile']);
  28. Route::post('/update-profile', ['as' => 'updateprofile', 'uses' => 'UserController@postUpdateProfile']);
  29. }
  30. );
  31. // End User
  32. // Start Tips
  33. Route::group(
  34. [
  35. 'prefix' => 'tips',
  36. 'as' => 'tips.',
  37. ],
  38. function () {
  39. Route::get('/all', ['as' => 'index', 'uses' => 'TipsController@getAll']);
  40. Route::get('/find/{data_id?}', ['as' => 'find', 'uses' => 'TipsController@getSingle']);
  41. Route::post('/like/{data_id?}', ['as' => 'like', 'uses' => 'TipsController@postLike']);
  42. Route::post('/log', ['as' => 'Log', 'uses' => 'TipsController@postLog']);
  43. }
  44. );
  45. // End Tips
  46. // Start Trivia
  47. Route::group(
  48. [
  49. 'prefix' => 'trivia',
  50. 'as' => 'trivia.',
  51. ],
  52. function () {
  53. Route::get('/all', ['as' => 'index', 'uses' => 'TriviaController@getAll']);
  54. Route::get('/find/{data_id?}', ['as' => 'find', 'uses' => 'TriviaController@getSingle']);
  55. Route::post('/submit-answer', ['as' => 'submitanswer', 'uses' => 'TriviaController@postSubmitAnswer']);
  56. }
  57. );
  58. // End Trivia
  59. // Start Transportation
  60. Route::group(
  61. [
  62. 'prefix' => 'transportation',
  63. 'as' => 'transportation.',
  64. ],
  65. function () {
  66. Route::get('/all', ['as' => 'index', 'uses' => 'TransportationController@getAll']);
  67. Route::get('/find-by-user/{data_id?}', ['as' => 'find_by_user', 'uses' => 'TransportationController@getByUser']);
  68. Route::post('/store', ['as' => 'store', 'uses' => 'TransportationController@postStore']);
  69. Route::post('/update', ['as' => 'store', 'uses' => 'TransportationController@postUpdate']);
  70. Route::post('/delete', ['as' => 'store', 'uses' => 'TransportationController@delete']);
  71. }
  72. );
  73. // End Transportation
  74. // Start Timline
  75. Route::group(
  76. [
  77. 'prefix' => 'timeline',
  78. 'as' => 'timeline.',
  79. ],
  80. function () {
  81. Route::get('/all', ['as' => 'index', 'uses' => 'TimelineController@getAll']);
  82. Route::get('/find-by-user/{data_id?}', ['as' => 'find_by_user', 'uses' => 'TimelineController@getByUser']);
  83. Route::post('/store', ['as' => 'store', 'uses' => 'TimelineController@postStore']);
  84. Route::post('/update', ['as' => 'store', 'uses' => 'TimelineController@postUpdate']);
  85. Route::post('/delete', ['as' => 'store', 'uses' => 'TimelineController@delete']);
  86. }
  87. );
  88. // End Timeline
  89. // Start News
  90. Route::group(
  91. [
  92. 'prefix' => 'news',
  93. 'as' => 'news.',
  94. ],
  95. function () {
  96. Route::get('/all', ['as' => 'index', 'uses' => 'NewsController@getAll']);
  97. Route::get('/find/{data_id?}', ['as' => 'find', 'uses' => 'NewsController@getSingle']);
  98. Route::post('/like/{data_id?}', ['as' => 'like', 'uses' => 'NewsController@postLike']);
  99. Route::post('/log', ['as' => 'Log', 'uses' => 'NewsController@postLog']);
  100. }
  101. );
  102. // End News
  103. // Start Kelompok Driver
  104. Route::group(
  105. [
  106. 'prefix' => 'kelompokdriver',
  107. 'as' => 'kelompokdriver.',
  108. ],
  109. function () {
  110. Route::get('/all', ['as' => 'index', 'uses' => 'KelompokDriverController@getAll']);
  111. }
  112. );
  113. // End Kelompok Driver
  114. // Start PointLog
  115. Route::group(
  116. [
  117. 'prefix' => 'points',
  118. 'as' => 'points.',
  119. ],
  120. function () {
  121. Route::get('/all', ['as' => 'index', 'uses' => 'PointLogController@getAll']);
  122. Route::get('/all/nonevent', ['as' => 'index', 'uses' => 'PointLogController@getNonEvent']);
  123. Route::get('/all/withevent', ['as' => 'index', 'uses' => 'PointLogController@getWithEvent']);
  124. }
  125. );
  126. // End PointLog
  127. // Start Message
  128. Route::group(
  129. [
  130. 'prefix' => 'message',
  131. 'as' => 'message.',
  132. ],
  133. function () {
  134. Route::get('/all', ['as' => 'index', 'uses' => 'MessageController@getAll']);
  135. Route::get('/find/{data_id?}', ['as' => 'find', 'uses' => 'MessageController@getSingle']);
  136. Route::get('/count-user-message/{data_id?}', ['as' => 'count_user_message', 'uses' => 'MessageController@countUserMessage']);
  137. Route::get('/user-view-message/{message_id?}/{user_id?}', ['as' => 'user_view_message', 'uses' => 'MessageController@userViewMessage']);
  138. Route::get('/find-by-user/{data_id?}', ['as' => 'find_by_user', 'uses' => 'MessageController@getByUser']);
  139. }
  140. );
  141. // End Message
  142. // Start Travel
  143. Route::group(
  144. [
  145. 'prefix' => 'travel',
  146. 'as' => 'travel.',
  147. ],
  148. function () {
  149. Route::get('/all', ['as' => 'index', 'uses' => 'TravelController@getAll']);
  150. Route::post('/request', ['as' => 'request', 'uses' => 'TravelController@postRequest']);
  151. Route::post('/log', ['as' => 'Log', 'uses' => 'TravelController@postLog']);
  152. }
  153. );
  154. // End Travel
  155. // Start Test
  156. Route::group(
  157. [
  158. 'prefix' => 'test',
  159. 'as' => 'test.',
  160. ],
  161. function () {
  162. Route::post('/hash', ['as' => 'hash', 'uses' => 'TestController@hash']);
  163. }
  164. );
  165. // End Test