Laravel model::make() why?

mark-snape

Oct 18th, 2020 04:29 PM

I'm trying to understand practical differences (if any) between Model::make([attributes]) and new Model([attributes])

thinkverse

Oct 18th, 2020 05:11 PM

Hello there. 🙂

As far as I can tell by looking at the code, there is no practical difference.

Except ::make() is called from the builder and not the model abstract. But it does call newIntance() on the model abstract and runs new static() with the parameters that are passed in to ::make().

I could've missed something though, just took a cursory glance at it real quick.