Update TelescopeServiceProvider.php
This commit is contained in:
@@ -15,20 +15,18 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
|
|||||||
public function register(): void
|
public function register(): void
|
||||||
{
|
{
|
||||||
// Telescope::night(); // Modo oscuro opcional
|
// Telescope::night(); // Modo oscuro opcional
|
||||||
|
|
||||||
$this->hideSensitiveRequestDetails();
|
$this->hideSensitiveRequestDetails();
|
||||||
$isProduction = $this->app->environment('production');
|
$isProduction = $this->app->environment('production');
|
||||||
|
|
||||||
Telescope::filter(function (IncomingEntry $entry) use ($isProduction) {
|
Telescope::filter(function (IncomingEntry $entry) use ($isProduction) {
|
||||||
return !$isProduction || // Permite en desarrollo
|
return !$isProduction || // Permite en desarrollo
|
||||||
auth()->check() && in_array(auth()->user()->rol->nombre, ['administrador', 'super']) ||
|
|
||||||
$entry->isReportableException() ||
|
$entry->isReportableException() ||
|
||||||
$entry->isFailedRequest() ||
|
$entry->isFailedRequest() ||
|
||||||
$entry->isFailedJob() ||
|
$entry->isFailedJob() ||
|
||||||
$entry->isScheduledTask() ||
|
$entry->isScheduledTask() ||
|
||||||
$entry->hasMonitoredTag();
|
$entry->hasMonitoredTag();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user