Repo for the search and displace core module including the interface to select files and search and displace operations to run on them. https://searchanddisplace.com
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.

61 lines
1.7 KiB

3 years ago
3 years ago
  1. <?php
  2. use App\Http\Controllers\FileController;
  3. use App\Http\Controllers\FilterController;
  4. use Illuminate\Support\Facades\Route;
  5. /*
  6. |--------------------------------------------------------------------------
  7. | API Routes
  8. |--------------------------------------------------------------------------
  9. |
  10. | Here is where you can register API routes for your application. These
  11. | routes are loaded by the RouteServiceProvider within a group which
  12. | is assigned the "api" middleware group. Enjoy building your API!
  13. |
  14. */
  15. # File routes
  16. // Route::name('file.')->prefix('file')->middleware('auth:api')->group(
  17. Route::name('file.')->prefix('file')->group(
  18. function() {
  19. # POST "/file" (used to create/upload a file)
  20. Route::post('/', [
  21. FileController::class,
  22. 'create'
  23. ])->name('create');
  24. # GET "/file/{id}" (to retrieve data about a file)
  25. Route::get('/{id}', [
  26. FileController::class,
  27. 'get'
  28. ])->name('get');
  29. }
  30. );
  31. # File routes
  32. // Route::name('filter.')->prefix('filter')->middleware('auth:api')->group(
  33. Route::name('filter.')->prefix('filter')->group(
  34. function() {
  35. # POST "/file" (used to create/upload a file)
  36. Route::post('/', [
  37. FilterController::class,
  38. 'create'
  39. ])->name('create');
  40. # GET "/filter/all" (to retrieve data about a filter)
  41. Route::get('/all', [
  42. FilterController::class,
  43. 'get'
  44. ])->name('get.all');
  45. # GET "/filter/{id}" (to retrieve data about a filter)
  46. Route::get('/{id}', [
  47. FilterController::class,
  48. 'get'
  49. ])->name('get');
  50. }
  51. );