Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel update by id

Model::where('id',1)->update(['name'=>'updated name']);
//or
$data         = Model::findOrFail($id); //primary id
$data->name   = $request->input('updated name');
$data->save();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #update #id
ADD COMMENT
Topic
Name
4+5 =