Skip to content

Commit 49cee05

Browse files
committed
Update IndexCrudControllerCreator.php
1 parent 990c468 commit 49cee05

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/Ubiquity/scaffolding/creators/IndexCrudControllerCreator.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,7 @@ public function create(ScaffoldController $scaffoldController) {
4141
}
4242

4343
protected function getHome($path) {
44-
$elements=\explode("/",$path);
45-
$r=[];
46-
foreach ($elements as $index=>$elm){
47-
if($elm==='{resource}'){
48-
if(\count($r)===0){
49-
$r[]='#/home';
50-
}else{
51-
$r[]='home';
52-
}
53-
}elseif($elm!=''){
54-
$r[]=$elm;
55-
}
56-
}
57-
return implode("/", $r);
44+
return '#/'.\str_replace('{resource}', 'home',$path);
5845
}
5946
}
6047

0 commit comments

Comments
 (0)