Skip to content

Commit 30c872c

Browse files
committed
Specify route parameters
1 parent f67dd34 commit 30c872c

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/routes/web.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@
2020
// Redirect GET routes without filterKey
2121
Route::get('s-dashboard/{dashboardKey}', fn ($entityKey) => redirect(
2222
route('code16.sharp.dashboard', [
23-
sharp()->context()->globalFilterUrlSegmentValue(),
24-
$entityKey]
25-
)
23+
'filterKey' => sharp()->context()->globalFilterUrlSegmentValue(),
24+
'entityKey' => $entityKey,
25+
])
2626
));
2727
Route::get('s-list/{entityKey}', fn ($entityKey) => redirect(
2828
route('code16.sharp.list', [
29-
sharp()->context()->globalFilterUrlSegmentValue(),
30-
$entityKey,
29+
'filterKey' => sharp()->context()->globalFilterUrlSegmentValue(),
30+
'entityKey' => $entityKey,
3131
])
3232
));
3333
Route::get('s-show/{entityKey}', fn ($entityKey) => redirect(
3434
route('code16.sharp.single-show', [
35-
sharp()->context()->globalFilterUrlSegmentValue(),
36-
$entityKey,
35+
'filterKey' => sharp()->context()->globalFilterUrlSegmentValue(),
36+
'entityKey' => $entityKey,
3737
])
3838
));
3939

@@ -64,25 +64,25 @@
6464
// Redirect GET routes without filterKey
6565
Route::get('{parentUri}/s-show/{entityKey}/{instanceId}', fn ($parentUri, $entityKey, $instanceId) => redirect(
6666
route('code16.sharp.show.show', [
67-
sharp()->context()->globalFilterUrlSegmentValue(),
68-
$parentUri,
69-
$entityKey,
70-
$instanceId,
67+
'filterKey' => sharp()->context()->globalFilterUrlSegmentValue(),
68+
'parentUri' => $parentUri,
69+
'entityKey' => $entityKey,
70+
'instanceId' => $instanceId,
7171
])
7272
));
7373
Route::get('{parentUri}/s-form/{entityKey}', fn ($parentUri, $entityKey) => redirect(
7474
route('code16.sharp.form.create', [
75-
sharp()->context()->globalFilterUrlSegmentValue(),
76-
$parentUri,
77-
$entityKey,
75+
'filterKey' => sharp()->context()->globalFilterUrlSegmentValue(),
76+
'parentUri' => $parentUri,
77+
'entityKey' => $entityKey,
7878
])
7979
));
8080
Route::get('{parentUri}/s-form/{entityKey}/{instanceId}', fn ($parentUri, $entityKey, $instanceId) => redirect(
8181
route('code16.sharp.form.edit', [
82-
sharp()->context()->globalFilterUrlSegmentValue(),
83-
$parentUri,
84-
$entityKey,
85-
$instanceId,
82+
'filterKey' => sharp()->context()->globalFilterUrlSegmentValue(),
83+
'parentUri' => $parentUri,
84+
'entityKey' => $entityKey,
85+
'instanceId' => $instanceId,
8686
])
8787
));
8888

0 commit comments

Comments
 (0)