Attempt to read property "budget" on null
I'm having this issue where it throws this error on this piece of code
The property budget is not null and is read.
if I it shows the correct value
if I it shows obviously
3 Replies
Guessing the code gets triggered again without the request parameter being present. Don’t dd, but log and see what happens.
if you're on loop, please check all your data (maybe your dd only check first data)
Since it's getting
null
back from the query, it means it couldn't find the record by that id
. So you could also try determining what it was searching for: