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.

25 lines
882 B

2 years ago
2 years ago
2 years ago
2 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::apiResource('collections',CollectionController::class);
  19. Route::delete('/collections/{collection}',[CollectionController::class,"destroy"])->withTrashed();
  20. Route::post('{collection_name}/{?model_name}',[FileController::class,'store']);