hideSensitiveRequestDetails(); } /** * Prevent sensitive request details from being logged by Telescope. * * @return void */ protected function hideSensitiveRequestDetails() { if ($this->app->environment('local')) { return; } // Remove the following lines related to Telescope // Telescope::hideRequestParameters(['_token']); // Telescope::hideRequestHeaders(['cookie', 'x-csrf-token', 'x-xsrf-token']); } /** * Register the Telescope gate. * * This gate determines who can access Telescope in non-local environments. * * @return void */ protected function gate() { Gate::define('viewTelescope', function ($user) { return $user !== null && $user->isAdmin(); }); } }