Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

perry020's avatar

How to fuse 3 columns in to 1 column in another table with create function

Hi, I have 2 tables that are one to one.

Table 1 relations with column 'full_name' Table 2 relations_identity with columns 'first_name','middle_name','last_name'

How can I make a create function in controller that fuses the columns in table 2 in to table 1 column 'full_name' ?

0 likes
2 replies
perry020's avatar

i solved it with

$name = $request->first_name . ' ' . $request->middle_name . ' ' . ' ' . $request->last_name; $persons = Person::create([ 'name' => $name ]);

Please or to participate in this conversation.