F
Filament11mo 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
dandouana8mo ago
Did you get solution for that ?
Dennis Koch
Dennis Koch8mo ago
Like you would anywhere else in PHP? YourResource::$pr Sounds more like you want a property on the Pages though
Want results from more Discord servers?
Add your server