Have you registered your TelescopeServiceProvider in config\app.php providers array?
Jun 28, 2019
4
Level 8
Accessing telescope in production
Hello fellow laravites, I just deployed my application online (using Digital Ocean and Forge) and I would like to be able to access laravel telescope. I updated the gate() method in the TelescopeServiceProvider.php as follows :
protected function gate()
{
Gate::define('viewTelescope', function ($user) {
return $user->id == 1;
});
}
Somehow, this does not seem to be working. When I visit my-website-url/telescope, logged in as the user with id 1, I still get a 403 I also tried this :
return in_array($user->email, [
'[email protected]'
]);
but the result is the same.
Can anyone spot my mistake ? Thanks in advance !
Level 73
Please or to participate in this conversation.