addCodeToStaffIndexBlade(); } public function addCodeToStaffIndexBlade() { $masterPath = resource_path('/views/backEnd/staffs/index.blade.php'); if (file_exists($masterPath)) { $content = file_get_contents($masterPath); $elementExists = null; // Check added code if already exists preg_match("/\@if\(permissionCheck\('can_have_downline'\)/", $content, $elementExists); if ($elementExists) return; preg_match('/\