Skip to content

Commit bad78e7

Browse files
authored
Merge pull request #4643 from Laravel-Backpack/route_prefix
remove path separator from begin of string
2 parents fc37a29 + 7068cae commit bad78e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app/Library/CrudPanel/CrudPanel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function getSqlDriverList()
181181
*/
182182
public function setRoute($route)
183183
{
184-
$this->route = $route;
184+
$this->route = ltrim($route, '/');
185185
}
186186

187187
/**
@@ -195,6 +195,8 @@ public function setRoute($route)
195195
*/
196196
public function setRouteName($route, $parameters = [])
197197
{
198+
$route = ltrim($route, '.');
199+
198200
$complete_route = $route.'.index';
199201

200202
if (! \Route::has($complete_route)) {

0 commit comments

Comments
 (0)