$view must not be accessed before initialization
What I am trying to do:
To go to the resource that is located inside a cluster. There I have custom index page for route('/').
What I did:
In every page
Have tried to comment whole resource or pages for that resource, but the error persisted.
The only thing was when I have commented page for index route, it said:
My issue/the error:
The error can be seen in the screenshot.
The question is, where it can be possible located?
In the internet was said that
To go to the resource that is located inside a cluster. There I have custom index page for route('/').
What I did:
In every page
Filament\Resources\Pages\Page inside that cluster for that resource I have this with corresponding blade file:Have tried to comment whole resource or pages for that resource, but the error persisted.
The only thing was when I have commented page for index route, it said:
Class "App\Filament\Clusters\CustomsCluster\CustomResource\Pages\CustomList" not foundMy issue/the error:
The error can be seen in the screenshot.
Typed static property Filament\Pages\BasePage::$view must not be accessed before initializationThe question is, where it can be possible located?
In the internet was said that
$view must be initialised for getView(), and it is in every view.Solution
Strangely, but in my case the error was that,
After providing this:
It it working fine. Still don't understand why it is the case, since in other cluster resources
canAccess() was not provided. Therefore, it could not access that resource at all.After providing this:
It it working fine. Still don't understand why it is the case, since in other cluster resources
canAccess() is deafult, not rewritten in resource itself.