Docs authorization: How do i make docs/api available on env=stage #308
-
The default behaviour allows docs/api to be accessible on env=local. I also want to make it available on env=stage. The documentation hints at the possibility of doing this through the 'Gate' but the snippet wasn't clear how to do it.
I also tried Both result in a HTTP 403. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This seems to work. Gate::define('viewApiDocs', function ($user = null) {
|
Beta Was this translation helpful? Give feedback.
This seems to work.
Gate::define('viewApiDocs', function ($user = null) {
return app()->environment('stage');