@vampiremr in_array is case sensitive, so you might want to first start off by checking that.
Mar 2, 2023
5
Level 1
403 forbidden in Laravel Nova
I use Laravel 10.1.5 and Nova 4.22.1 When in .env APP_ENV=local all ok But when APP_ENV=production I see error 403 on my admin/login page
I try to write
Gate::define('viewNova', function ($user) {
return in_array($user->email, [
'myrealemail'
]);
});
in NovaServiceProvider.php but nothigt
How I can fix it for production?
Please or to participate in this conversation.