Skip to content

Commit

Permalink
Merge pull request #5397 from Laravel-Backpack/details-row-optional
Browse files Browse the repository at this point in the history
Make setup of details row routes optional
  • Loading branch information
pxpm authored Dec 7, 2023
2 parents 2b09f03 + 7d9e5f1 commit d1e0603
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/app/Http/Controllers/Operations/ListOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ protected function setupListRoutes($segment, $routeName, $controller)
'operation' => 'list',
]);

Route::get($segment.'/{id}/details', [
'as' => $routeName.'.showDetailsRow',
'uses' => $controller.'@showDetailsRow',
'operation' => 'list',
]);
if (! isset($this->setupDetailsRowRoute) || $this->setupDetailsRowRoute === true) {
Route::get($segment.'/{id}/details', [
'as' => $routeName.'.showDetailsRow',
'uses' => $controller.'@showDetailsRow',
'operation' => 'list',
]);
}
}

/**
Expand Down

0 comments on commit d1e0603

Please sign in to comment.