I developed a laravel API and installed laravel telescope. I want to restrict telescope on prod server, but I don't know how to do it. Solution I found is with Gate, but not working. So my idea is how to restrict route only to specific people (1 or 2). Now all users have access to /telescope.
Gate::define('viewTelescope', function ($user) {
return in_array($user->email, [
//emails
]);
});