Answer the question
In order to leave comments, you need to log in
How to make a select when creating a post?
$user = User::create(['id'=>1,'name'=>'test'])
When creating a record, all saved fields are returned, how can I make it so that when saving I can specify the fields that I want to see, for example, here I I want to see only name
Tried like this User::create(['id'=>1,'name'=>'test'])->select('name')->get()
but this returns all records in the database
Answer the question
In order to leave comments, you need to log in
See where?
In short, it's not okay. And you don't need to. What do you want to achieve?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question