Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

api_v1.php 5.5KB

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