hideSensitiveRequestDetails(); $isProduction = $this->app->environment('production'); Telescope::filter(function (IncomingEntry $entry) use ($isProduction) { return !$isProduction || // Permite en desarrollo $entry->isReportableException() || $entry->isFailedRequest() || $entry->isFailedJob() || $entry->isScheduledTask() || $entry->hasMonitoredTag(); }); } /** * Prevent sensitive request details from being logged by Telescope. */ protected function hideSensitiveRequestDetails(): void { Telescope::hideRequestParameters(['_token']); Telescope::hideRequestHeaders([ 'cookie', 'x-csrf-token', 'x-xsrf-token', ]); } /** * Register the Telescope gate. * * This gate determines who can access Telescope. */ protected function gate(): void { Gate::define('viewTelescope', function ($user) { return auth()->check() && (auth()->user()->rol->nombre === "administrador" || auth()->user()->rol->nombre === "super"); }); } }