Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
tipuloidea
/
back
/
vendor
/
laravel
/
telescope
/
src
:
TelescopeApplicationServiceProvider.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Laravel\Telescope; use Illuminate\Support\Facades\Gate; use Illuminate\Support\ServiceProvider; class TelescopeApplicationServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { $this->authorization(); } /** * Configure the Telescope authorization services. * * @return void */ protected function authorization() { $this->gate(); Telescope::auth(function ($request) { return app()->environment('local') || Gate::check('viewTelescope', [$request->user()]); }); } /** * 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 in_array($user->email, [ // ]); }); } /** * Register any application services. * * @return void */ public function register() { // } }