Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

iqbal Laravel save record in two table in one line

$phone = Phone::find(1);
 
$user = User::find(10);
 
$phone->user()->associate($user)->save();
Source by www.itsolutionstuff.com #
 
PREVIOUS NEXT
Tagged: #iqbal #Laravel #save #record #table #line
ADD COMMENT
Topic
Name
3+4 =