T
T
Troodi Larson2019-03-02 19:20:23
Laravel
Troodi Larson, 2019-03-02 19:20:23

Does hasOne affect model creation?

Let's say there is a users table, it has a table of phone numbers, where there is no default value.
The question of such a plan, when creating a user through the model, is the phone table not affected? After all, when registering, there is no default phone number.
As far as I can see, creation proceeds as usual, while hasOne only works for fetches. However, I ask experts for reinsurance. Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2019-03-02
@troodi

In short:
- No, it is not affected
:)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question