I'm having an issue authorizing the package using the canSee method and a gate.
NovaServiceProvider.php
NovaSettings::make()->canSee(
function ($request) {
return $request->user()->can('permissions.admin');
}
),
The tool is visible in the side menu which would imply that the authorization is working. However once clicked on it gives a 500 error and Call to a member function can() on null is logged meaning $request->user() is returning null.
It seems like something is happening behind the scenes on click which doesn't pass canSee the correct $request? Using the Auth::user() results in the same error. Testing with other packages don't result in the same error.
I'm having an issue authorizing the package using the canSee method and a gate.
The tool is visible in the side menu which would imply that the authorization is working. However once clicked on it gives a 500 error and
Call to a member function can() on null
is logged meaning$request->user()
is returning null.It seems like something is happening behind the scenes on click which doesn't pass canSee the correct $request? Using the
Auth::user()
results in the same error. Testing with other packages don't result in the same error.