error('React files not found');
return;
}
foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
if ($file->getExtension() == 'js') {
if (str_contains($file->getFileName(), 'index-')) {
$includes .= ''."\n";
} else {
$includes .= ''."\n";
}
}
if (str_contains($file->getFileName(), '.css')) {
$includes .= ''."\n";
}
}
file_put_contents(resource_path('views/react/head.blade.php'), $includes);
}
}