Skip to content

Commit

Permalink
fix: span and p tag both checked for existing menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mitulgolakiya committed Jun 4, 2021
1 parent 8ec0fe2 commit 7c0aa12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Generators/Scaffold/MenuGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public function generate()
{
$this->menuContents .= $this->menuTemplate.infy_nl();
$existingMenuContents = file_get_contents($this->path);
if (Str::contains($existingMenuContents, '<span>'.$this->commandData->config->mHumanPlural.'</span>')) {
// adminlte uses <p> tab and coreui+stisla uses <span> tag for menu
if (Str::contains($existingMenuContents, '<p>'.$this->commandData->config->mHumanPlural.'</p>') or
Str::contains($existingMenuContents, '<span>'.$this->commandData->config->mHumanPlural.'</span>')) {
$this->commandData->commandObj->info('Menu '.$this->commandData->config->mHumanPlural.' is already exists, Skipping Adjustment.');

return;
Expand Down

0 comments on commit 7c0aa12

Please sign in to comment.