Skip to content

Commit c100e40

Browse files
committed
fix: span and p tag both checked for existing menu
1 parent 6a17c32 commit c100e40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Generators/Scaffold/MenuGenerator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ public function generate()
5151
{
5252
$this->menuContents .= $this->menuTemplate.infy_nl();
5353
$existingMenuContents = file_get_contents($this->path);
54-
if (Str::contains($existingMenuContents, '<p>'.$this->commandData->config->mHumanPlural.'</p>')) {
54+
// adminlte uses <p> tab and coreui+stisla uses <span> tag for menu
55+
if (Str::contains($existingMenuContents, '<p>'.$this->commandData->config->mHumanPlural.'</p>') or
56+
Str::contains($existingMenuContents, '<span>'.$this->commandData->config->mHumanPlural.'</span>')) {
5557
$this->commandData->commandObj->info('Menu '.$this->commandData->config->mHumanPlural.' is already exists, Skipping Adjustment.');
5658

5759
return;

0 commit comments

Comments
 (0)