addCodesToMaster(); $this->addModalVueToMaster(); //$this->addCreateStudioToMenu(); $this->addBootstrapIconToHead(); $this->addGenerateTokenToLoginController(); } public function addCodesToMaster() { $masterPath = resource_path('/views/backEnd/master.blade.php'); if (file_exists($masterPath)) { $content = file_get_contents($masterPath); $elementExists = null; preg_match("/window.authToken/", $content, $elementExists); if ($elementExists) return; $matchedElement = null; preg_match("/\@include\('backEnd.partials._scripts'\)\r\n/", $content, $matchedElement); $codes = ""; if ($matchedElement) { $codes .= " "; $codes .= $matchedElement[0]; $appendContent = preg_replace("/\@include\('backEnd.partials._scripts'\)\r\n/", $codes, $content); file_put_contents($masterPath, $appendContent, LOCK_EX); } } } public function addModalVueToMaster() { $masterPath = resource_path('/views/backEnd/master.blade.php'); if (file_exists($masterPath)) { $content = file_get_contents($masterPath); $elementExists = null; preg_match('/\