User::where('id', $user_id)
->update([
'name' => $name
]);
Model::where('id',1)->update(['name'=>'updated name']);
//or
$data = Model::findOrFail($id); //primary id
$data->name = $request->input('updated name');
$data->save();
Post::where('id',3)->update(['title'=>'Updated title']);
use AppModelsFlight;
$flight = Flight::find(1);
$flight->name = 'Paris to London';
$flight->save();
User::query()->whereId($user->id)
->update([
'column' => 'value',
'n' => 'n',
]);
$flight = AppModelsFlight::find(1);
$flight->name = 'New Flight Name';
$flight->save();
DB::table('post')
->where('id', 3)
->update(['title' => "Updated Title"]);
<form action="{{route('blog.update',$blog[0]->id)}}" method="post">
@csrf
@method('PUT')
<textarea name="txtTitle" >
{{$blog[0]->title}}
</textarea>
<input type="submit" value="Update" />
</form>