Correctly call the route for accessory index

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-08-11 09:40:49 +01:00
parent 6adaa32286
commit df8f6a8d2b

View file

@ -131,7 +131,8 @@ class AccessoriesController extends Controller
// Check if the asset exists
if (is_null($accessory_to_clone = Accessory::find($accessoryId))) {
// Redirect to the asset management page
return redirect()->route('accessory.index')->with('error', trans('admin/accessories/message.does_not_exist'));
return redirect()->route('accessories.index')
->with('error', trans('admin/accessories/message.does_not_exist', ['id' => $accessoryId]));
}
$accessory = clone $accessory_to_clone;