APP_ENV=Production vs APP_ENV=local

Hello Guys, I have a problem. I developed an app with panels in FilamentPHP and added policies to it, so far so good, the problem arose when taking it to production with Laravel Forge... It turns out that when I try to access it it gives me a 403 Forbidden error, check if it was something with my policies and the problem is not there, check other things and nothing there, until I get to test the .env, and it turns out that when changing the variable
APP_ENV=production
APP_ENV=production
to
APP_ENV=local
APP_ENV=local
the application loads correctly... so it doesn't happen here I understand why this 403 block appears... any idea why it could be? I have another app that I created with Laravel and the .env file has the
APP_ENV=production
APP_ENV=production
and I send the BackOffice without problem, something that does not happen with Laravel and Filamentphp, it gives me problems... any ideas or suggestions?
5 Replies
TranceCode
TranceCodeOP5mo ago
it's working now bro, but Now it is working for me, but it turns out that if I don't want to validate this and give it permissions? How can I update it? Since I will have many users in the companies panel and the emails will be many, some may be gmail.com, outlook.com, company.com, or others, I do not have a way to validate this, the other thing is that I do not need to validate or verify the accounts since for what I do it is not necessary, since I will create the accounts personally, I will not have a section for accounts to be created from a form in the front, a /register I mean, how do I avoid this? returning true, false or do you recommend another action? thank you so much!
Vp
Vp5mo ago
the return type is bool so you can do whatever logic you want or none at all. All that matters is whether it return true or false
toeknee
toeknee5mo ago
As above... just query the db / permission check
TranceCode
TranceCodeOP5mo ago
thank you so much bro!
Want results from more Discord servers?
Add your server