Redirect /asset_tag/view to /asset_tag

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-11-08 14:40:56 +00:00
parent ef10f2e50e
commit d2bf71327b

View file

@ -122,9 +122,9 @@ Route::group(
[AssetCheckinController::class, 'store']
)->name('hardware.checkin.store');
Route::get('{assetId}/view',
[AssetsController::class, 'show']
)->name('hardware.view');
Route::get('{assetId}/view', function ($assetId) {
return redirect()->route('hardware.show', ['hardware' => $assetId]);
});
Route::get('{assetId}/qr_code',
[AssetsController::class, 'getQrCode']
@ -178,13 +178,17 @@ Route::group(
Route::post('bulkcheckout',
[BulkAssetsController::class, 'storeCheckout']
)->name('hardware.bulkcheckout.store');
});
Route::resource('hardware',
AssetsController::class,
[
'middleware' => ['auth'],
'parameters' => ['asset' => 'asset_id'
'parameters' => ['asset' => 'asset_id',
'names' => [
'show' => 'view',
],
],
]);