A
A
Alexander Shvedov2019-08-26 17:51:45
Laravel
Alexander Shvedov, 2019-08-26 17:51:45

Laravel multiple insert links how to organize?

there is a code

$car1=CarThief::create(['name'=>'Alex','thief_id'=>'2']);

how to insert several values ​​instead of 2 if a one-to-many relationship is used
tried with an array nothing it would be nice if you showed this piece of code

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Wells, 2019-08-26
@Alex_Wells

https://laravel.com/docs/5.8/eloquent-relationship...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question