PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved

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.