When I use update() with find() and invalid id like
User::find(100)
->update(['is_valid' => true])
I got error:
Error: Call to a member function update() on null
But when I use update() with where and invalid id like
User::where('id', 100)
->update(['is_valid' => true])
It returns false as expected. so what is the problem when I use find()? How to solve it?