Answer the question
In order to leave comments, you need to log in
Is it possible to update a record in the database like this through the Laravel model?
Hello! Is it possible to update a record in the database like this:
1. Find a record by the primary key and create an object for this record
2. Assign some values to the object's properties
3. Save the object?
$ModelOfRecord = DNS::find($recid);
$ModelOfRecord->host = $host;
$ModelOfRecord->type = $type;
$ModelOfRecord->priority = $priority;
$ModelOfRecord->content = $content;
$ModelOfRecord->save();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question