Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel model update

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 #model #update
ADD COMMENT
Topic
Name
6+5 =