Open andersespedalen opened 4 years ago
@andersespedalen hmmm I'll have to check with this specific version of nova maybe
Current version works for me
Hi @andersespedalen ,
I think you need to pass the default argument value to null in your define method.
Not ($user) but ($user = null).
As this:
protected function gate()
{
Gate::define('viewNova', function ($user = null) {
return true;
});
}
Don't think so. The callback of Gate::define() does not require a default value. At least not according to the Laravel documentation or the rest of my project. And adding it does not fix the problem.
In the browser, login works fine using the same user as in the test Regardless of using the seeded data, or creating the user in the test, I'm getting Unauthenticated when testing Index
test
In NovaServiceProvider, even I allow all users to debug
PHPUnit
Environment: