Skip to content

Commit

Permalink
Merge pull request #26 from TheBnl/patch-1
Browse files Browse the repository at this point in the history
Don't pop when the last param is an ID
  • Loading branch information
lekoala authored Nov 18, 2022
2 parents 5e2898b + bbf1918 commit 4622e6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DefaultLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ public function getModelLink($action, array $params = null)

$dirParts = explode('/', $url);
// replace the current action
array_pop($dirParts);
if (!is_numeric(end($dirParts))) {
array_pop($dirParts);
}

$dirParts[] = 'doCustomLink';

$action = implode('/', $dirParts);
Expand Down

0 comments on commit 4622e6c

Please sign in to comment.