설명 없음
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.

api_v1.php 5.3KB

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