From b64b774bd55b308be8177bb5cf4c8152131436a8 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 24 Jul 2024 17:49:21 +0100 Subject: [PATCH] Use route model binding on clone, removed unneeded route Signed-off-by: snipe --- routes/web/hardware.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/routes/web/hardware.php b/routes/web/hardware.php index 7833f0fdaa..ee888aa1db 100644 --- a/routes/web/hardware.php +++ b/routes/web/hardware.php @@ -78,17 +78,14 @@ Route::group( [AssetsController::class, 'getAssetBySerial'] )->where('any', '.*')->name('findbyserial/hardware'); - Route::get('{assetId}/clone', + Route::get('{asset}/clone', [AssetsController::class, 'getClone'] - )->name('clone/hardware'); + )->name('clone/hardware')->withTrashed(); Route::get('{assetId}/label', [AssetsController::class, 'getLabel'] )->name('label/hardware'); - - Route::post('{assetId}/clone', - [AssetsController::class, 'postCreate'] - ); + Route::get('{assetId}/checkout', [AssetCheckoutController::class, 'create']