Skip to content

Commit 6546ab0

Browse files
committed
Fix remove home page method
1 parent 2f9c311 commit 6546ab0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Services/GenerateFrontEndService.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ protected function updateControllerMethod($old_view, $new_view, $new_method, $ol
8787
$this->renameFile($old_view_name, $new_view_name);
8888
$this->updateBladeStyleFile($new_target_view, $old_target_view);
8989
}
90-
9190
if (file_exists($old_style_sheet_name)) {
9291
$this->renameFile($old_style_sheet_name, $new_style_sheet_name);
9392
}
@@ -188,7 +187,7 @@ public function destroyPage($page)
188187
$slug = $page->slug === '/' ? 'home-page' : $page->slug;
189188
$this->removeView($slug);
190189
$this->removeStyleSheet($slug);
191-
$this->removeRoute($page->slug);
190+
$this->removeRoute($slug);
192191
}
193192

194193
protected function removeView($slug)
@@ -218,7 +217,7 @@ protected function removeRoute($route)
218217
{
219218
$routes = __DIR__.'./../../routes/frontend.php';
220219

221-
$method_name = $this->getControllerMethodName($route === '/' ? 'home-page' : $route);
220+
$method_name = $this->getControllerMethodName($route);
222221

223222
if ($route === '/') {
224223
file_put_contents($routes, str_replace(

0 commit comments

Comments
 (0)