get('/user', function (Request $request) { // return $request->user(); // }); Route::get('newTmp/{uuid}', function ($uuid) { $file = File::find($uuid); return Storage::disk('local')->temporaryUrl($file->server_path . $file->uuid . '.webp', now()->addMinutes(5),['collection_name'=>'Paris Renner II']); })->name('newTmp'); Route::group(['as' => 'api.'], function () { Route::apiResource('collections', CollectionController::class); Route::delete('collections/{collection}', [CollectionController::class, "destroy"])->withTrashed(); Route::get('{collection_name}/{uuid}.{extention}', [FileController::class, 'show'])->name('files.show'); // Route::get('{collection_name}/{path}', [FileController::class, 'private'])->name('files.private'); Route::post('{collection_name}/{model_id?}', [FileController::class, 'store'])->name('files.store'); Route::put('{collection_name}/{uuid}.{extention}',[FileController::class,'update'])->name('files.update'); Route::delete('{collection_name}/{uuid}.{extention}',[FileController::class,'destroy'])->withTrashed()->name('files.destroy'); });