F
Filament5mo ago
Ayz

how do you access properties on a resource from lifecycle hooks

I need an object filled once the create page opens so that the data is fetched once and can be referred to in each repeater field. In the resource file I have this code: public static Product $pr; How can I refer to this variable in the Create file's afterFill hook for instance?
2 Replies
dandouana
dandouana2mo ago
Did you get solution for that ?
Dennis Koch
Dennis Koch2mo ago
Like you would anywhere else in PHP? YourResource::$pr Sounds more like you want a property on the Pages though