Skip to content

firstOrCreate()->first() ? #33333

Answered by netpok
foremtehan asked this question in General
Discussion options

You must be logged in to vote

It is, you're calling a non existing method on a model so it will be passed to the builder. It is basically the same as calling:

  • Person::first() or
  • (new Person())->first()

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by foremtehan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants