From 597f6273ff999433ec23f9e36d2fe355d3c8f46b Mon Sep 17 00:00:00 2001 From: Matthias Bendel <60173505+cfmbe@users.noreply.github.com> Date: Mon, 27 Jul 2020 11:00:49 +0200 Subject: [PATCH] Update DuplicateController.php A standard laravel path uses plural for specifying the resource, like localhost/resources/myresources/1 instead of localhost/resources/myresource/1 Calling the path with singular resources leads to 404, because the page does not exist. --- src/Http/Controllers/DuplicateController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/DuplicateController.php b/src/Http/Controllers/DuplicateController.php index 31bde12..3731355 100644 --- a/src/Http/Controllers/DuplicateController.php +++ b/src/Http/Controllers/DuplicateController.php @@ -54,7 +54,7 @@ public function duplicate(Request $request) return [ 'status' => 200, 'message' => 'Done', - 'destination' => url(config('nova.path') . '/resources/' . $request->resource . '/' . $newModel->id) + 'destination' => url(config('nova.path') . '/resources/' . $request->resource . 's/' . $newModel->id) ]; } }