Answers for "eloquent model force table name"

PHP
1

laravel model update table

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


or 
  
  
  $affectedRows = Post::where("id", 3)->update(["title" => "Updated title"]);
Posted by: Guest on October-01-2021
0

laravel model update table

Post::where('id',3)->update(['title'=>'Updated title']);
Posted by: Guest on October-01-2021

Code answers related to "eloquent model force table name"

Browse Popular Code Answers by Language