Model::fresh() v.s. Model::refresh()

ยท

1 min read

Every time I try to "refresh" a model, I have always encountered this problem. Is it Model::fresh()? Or Model::refresh(). Both method exists. And both method have nearly same description. So, what's the different between these two methods?

Model::fresh()

Model::fresh() fetches a new, "fresh" model, and eager loaded with the same relationships, without touching current model.

Model::refresh()

Model::fresh() is doing the similar job. Except, it loads the data into current model.