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
Solution:Jump to 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.
5 Replies
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.the error is like this

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.
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.just tried this and its solved.
thanks mate 🫡