file($candidate); } } $index = public_path('admin/index.html'); if (! File::exists($index)) { abort(503, 'Admin frontend not built. Run npm run build in cxxfds-web.'); } return response()->file($index, ['Content-Type' => 'text/html; charset=UTF-8']); })->where('path', '.*')->name('admin.spa');