Answers for "laravel save many records"

PHP
0

iqbal Laravel save record in two table in one line

$phone = Phone::find(1);
 
$user = User::find(10);
 
$phone->user()->associate($user)->save();
Posted by: Guest on January-08-2022

Browse Popular Code Answers by Language