{{-- Laravel 8: no built-in @vite; loads Vite dev server or build/manifest.json --}}
@php
$hotPath = public_path('hot');
if (file_exists($hotPath)) {
$dev = rtrim(trim(file_get_contents($hotPath)), '/');
echo ''."\n";
echo ''."\n";
echo ''."\n";
} else {
$manifestPath = public_path('build/manifest.json');
if (! is_readable($manifestPath)) {
echo '';
} else {
$manifest = json_decode(file_get_contents($manifestPath), true);
$css = $manifest['resources/css/app.css']['file'] ?? null;
$js = $manifest['resources/js/app.js']['file'] ?? null;
if ($css) {
echo ''."\n";
}
if ($js) {
echo ''."\n";
}
}
}
@endphp