afterStateHydrated -undefined Method

I just want to make my web have a Map Picker Feature. Im using afterStateHydrated to get my latitude n longitude. But, the 'afterStateHydrated' method is undefined, btw I follow a tutorial and no error in that tutorial, and idk why my app is still work with that error still there. Anyway, I dont have muck experience in laravel and PHP. This is the github gist link: https://gist.github.com/SmilePMT/df742f29fe56da66cab81a7efe01afc5
Gist
gist:df742f29fe56da66cab81a7efe01afc5
GitHub Gist: instantly share code, notes, and snippets.
Solution:
Okey this is just an IDE error? If your app works than it's not a problem. Maybe adding https://github.com/barryvdh/laravel-ide-helper can help with this kind of "errors".
GitHub
GitHub - barryvdh/laravel-ide-helper: IDE Helper for Laravel
IDE Helper for Laravel. Contribute to barryvdh/laravel-ide-helper development by creating an account on GitHub.
Jump to solution
5 Replies
Zamion101
Zamion1012w ago
This is just an assumption but maybe you're missing >mutateDehydratedState function mentioned in the github page of the library to convert back to point class before saving to database. What is your error mesaage says? Can you also paste your error.
Smile PMT
Smile PMTOP2w ago
the error is like this
No description
Solution
Zamion101
Zamion1012w ago
Okey this is just an IDE error? If your app works than it's not a problem. Maybe adding https://github.com/barryvdh/laravel-ide-helper can help with this kind of "errors".
GitHub
GitHub - barryvdh/laravel-ide-helper: IDE Helper for Laravel
IDE Helper for Laravel. Contribute to barryvdh/laravel-ide-helper development by creating an account on GitHub.
Zamion101
Zamion1012w ago
afterStateHydrated comes from HasState which is used i Component and this use in Field and lastly OSMMap extends on Field so it is there, but your IDE just does not know it exists.
Smile PMT
Smile PMTOP4d ago
just tried this and its solved. thanks mate 🫡

Did you find this page helpful?