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.

26 lines
967 B

3 years ago
3 years ago
3 years ago
3 years ago
  1. <?php
  2. use App\Http\Controllers\CollectionController;
  3. use App\Http\Controllers\FileController;
  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. // Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
  16. // return $request->user();
  17. // });
  18. Route::group(['as' => 'api.'], function () {
  19. Route::apiResource('collections', CollectionController::class);
  20. Route::delete('/collections/{collection}', [CollectionController::class, "destroy"])->withTrashed();
  21. Route::post('{collection_name}/{model_name?}', [FileController::class, 'store'])->name('file.store');
  22. });