for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Foundation\Providers;
use Laravel\Telescope\Telescope;
use Illuminate\Support\Facades\Gate;
use Laravel\Telescope\IncomingEntry;
use Laravel\Telescope\TelescopeApplicationServiceProvider;
class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
//Telescope::night();
Telescope::filter(function (IncomingEntry $entry) {
if ($this->app->environment('local')) {
return true;
}
return $entry->isReportableException() ||
$entry->isFailedJob() ||
$entry->isScheduledTask() ||
$entry->hasMonitoredTag();
});
* Register the Telescope gate.
* This gate determines who can access Telescope in non-local environments.
protected function gate()
Gate::define('viewTelescope', function ($user) {
return in_array($user->email, [
//
]);