Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel model update table

$post = Post::find(3);
$post->title = "Updated title";
$post->save();


or 
  
  
  $affectedRows = Post::where("id", 3)->update(["title" => "Updated title"]);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #model #update #table
ADD COMMENT
Topic
Name
4+2 =