api.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. use Illuminate\Http\Request;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | API Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register API routes for your application. These
  9. | routes are loaded by the RouteServiceProvider within a group which
  10. | is assigned the "api" middleware group. Enjoy building your API!
  11. |
  12. */
  13. //Auth
  14. Route::post('auth/login', 'AuthController@authenticate');
  15. //Font
  16. Route::get('fonts_list', 'FontController@fonts_list');
  17. //Language
  18. Route::get('languages_list', 'LanguageController@languages_list');
  19. //Theme
  20. Route::get('themes_list', 'ThemeController@themes_list');
  21. // ******* JWT MIddleware *******
  22. Route::group(['middleware' => ['jwt']], function() {
  23. //Auth
  24. Route::group([
  25. 'prefix' => 'auth'
  26. ], function() {
  27. Route::get('profile', 'AuthController@profile');
  28. Route::post('logout', 'AuthController@logout');
  29. Route::post('refresh', 'AuthController@refresh');
  30. });
  31. //User
  32. Route::post('register_new_user', 'UserController@register_new_user');
  33. Route::post('edit_current_user', 'UserController@edit_current_user');
  34. Route::post('delete_current_users', 'UserController@delete_current_users');
  35. Route::get('get_user_by_id/{id}', 'UserController@get_user_by_id');
  36. Route::get('users_list/{current_page}/{per_page}/{type}/{key?}', 'UserController@users_list');
  37. //Company
  38. Route::post('register_company', 'CompanyController@register_company');
  39. Route::get('companies_list/{current_page}/{per_page}/{type}/{key?}', 'CompanyController@companies_list');
  40. Route::post('delete_current_companies', 'CompanyController@delete_current_companies');
  41. Route::post('handle_csv_file', 'CompanyController@handle_csv_file');
  42. });