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.

27 lines
911 B

4 years ago
3 years ago
3 years ago
4 years ago
  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. //Route::middleware('auth:api')->get('/user', function (Request $request) {
  15. // return $request->user();
  16. //});
  17. // pattern
  18. Route::pattern('uuid', '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}');
  19. Route::prefix('file')->group(function() {
  20. Route::get('{id}', 'App\Http\Controllers\Api\FileController@index')->name('api.file');
  21. Route::post('{id}', 'App\Http\Controllers\Api\FileController@upload')->name('api.file.upload');
  22. });