Rending ‘details’ view of a model, e.g. clicking into a record
Observed behavior
Shows " Your server encountered an error " forest screen - behind the scenes has
Undefined property ForestAdmin\LaravelForestAdmin\Auth\Guard\Model\ForestUser::$id
We have Laravel Policies in place which could be effecting this - but the list views work. Assume it’s an issue with the ‘store’ method but we’re in read-only forest mode anyway.
I’m able to supply our Policy/Model/Controller files in DMs with any ForestAdmin staff for further assistance.
Context
Project name: …
Team name: …
Environment name: 1.2.1
Agent type & version:
Recent changes made on your end if any: Setting up on development
That seems to have worked, we tweaked the suggestion slightly as ‘guard()->user’ as an attribute was protected and reversed the bool logic so returns sooner (personal preference!):
if (auth()->guard()->user() instanceof ForestUser) {
return true;
}