Нема описа
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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/{data_id?}', ['as' => 'find', 'uses' => 'TimelineController@getSingle']);
  83. Route::get('/find-by-user/{data_id?}', ['as' => 'find_by_user', 'uses' => 'TimelineController@getByUser']);
  84. Route::post('/store', ['as' => 'store', 'uses' => 'TimelineController@postStore']);
  85. Route::post('/update', ['as' => 'store', 'uses' => 'TimelineController@postUpdate']);
  86. Route::post('/delete', ['as' => 'store', 'uses' => 'TimelineController@delete']);
  87. }
  88. );
  89. // End Timeline
  90. // Start News
  91. Route::group(
  92. [
  93. 'prefix' => 'news',
  94. 'as' => 'news.',
  95. ],
  96. function () {
  97. Route::get('/all', ['as' => 'index', 'uses' => 'NewsController@getAll']);
  98. Route::get('/find/{data_id?}', ['as' => 'find', 'uses' => 'NewsController@getSingle']);
  99. Route::post('/like/{data_id?}', ['as' => 'like', 'uses' => 'NewsController@postLike']);
  100. Route::post('/log', ['as' => 'Log', 'uses' => 'NewsController@postLog']);
  101. }
  102. );
  103. // End News
  104. // Start Kelompok Driver
  105. Route::group(
  106. [
  107. 'prefix' => 'kelompokdriver',
  108. 'as' => 'kelompokdriver.',
  109. ],
  110. function () {
  111. Route::get('/all', ['as' => 'index', 'uses' => 'KelompokDriverController@getAll']);
  112. }
  113. );
  114. // End Kelompok Driver
  115. // Start PointLog
  116. Route::group(
  117. [
  118. 'prefix' => 'points',
  119. 'as' => 'points.',
  120. ],
  121. function () {
  122. Route::get('/all', ['as' => 'index', 'uses' => 'PointLogController@getAll']);
  123. Route::get('/all/nonevent', ['as' => 'index', 'uses' => 'PointLogController@getNonEvent']);
  124. Route::get('/all/withevent', ['as' => 'index', 'uses' => 'PointLogController@getWithEvent']);
  125. }
  126. );
  127. // End PointLog
  128. // Start Message
  129. Route::group(
  130. [
  131. 'prefix' => 'message',
  132. 'as' => 'message.',
  133. ],
  134. function () {
  135. Route::get('/all', ['as' => 'index', 'uses' => 'MessageController@getAll']);
  136. Route::get('/find/{data_id?}', ['as' => 'find', 'uses' => 'MessageController@getSingle']);
  137. Route::get('/count-user-message/{data_id?}', ['as' => 'count_user_message', 'uses' => 'MessageController@countUserMessage']);
  138. Route::get('/user-view-message/{message_id?}/{user_id?}', ['as' => 'user_view_message', 'uses' => 'MessageController@userViewMessage']);
  139. Route::get('/find-by-user/{data_id?}', ['as' => 'find_by_user', 'uses' => 'MessageController@getByUser']);
  140. }
  141. );
  142. // End Message
  143. // Start Travel
  144. Route::group(
  145. [
  146. 'prefix' => 'travel',
  147. 'as' => 'travel.',
  148. ],
  149. function () {
  150. Route::get('/all', ['as' => 'index', 'uses' => 'TravelController@getAll']);
  151. Route::post('/request', ['as' => 'request', 'uses' => 'TravelController@postRequest']);
  152. Route::post('/log', ['as' => 'Log', 'uses' => 'TravelController@postLog']);
  153. }
  154. );
  155. // End Travel
  156. // Start Test
  157. Route::group(
  158. [
  159. 'prefix' => 'test',
  160. 'as' => 'test.',
  161. ],
  162. function () {
  163. Route::post('/hash', ['as' => 'hash', 'uses' => 'TestController@hash']);
  164. }
  165. );
  166. // End Test