Laravel Telescope 403 production

1.8k views Asked by At

Won't work for me in production no matter what:

 protected function gate()
    {
        Gate::define('viewTelescope', function ($user) {
            return true;
        });
    }

In production always gives me 403, thought the database entries are all being created.

1

There are 1 answers

1
Lucas Dalmarco On BEST ANSWER

The problem was that I'm using a custom "admin" guard, and laravel telescope has no option to specifically change the guard, so I had to put the "admin" guard as default in the "config/auth" file:

'defaults' => [ 'guard' => 'admin', 'passwords' => 'users', ],