I'm using Laravel 5.6 and I ran into a problem when I try to edit database records:
Too few arguments to function App \ Http \ Controllers \ PagesController :: update (), 0 passed and exactly 2 expected
Function
public function atualizar($id, $corpo){
$conteudo = Conteudo::find($id);
$conteudo->corpo = $corpo;
$conteudo->save();
//return redirect()->route('');
}
Page edit.blade.php
<form method="post" action="{{action('PagesController@atualizar', $id)}}">
{{ csrf_field() }}
<div class="field">
<input type="hidden" value="{{ $conteudo['id'] }}"/>
<textarea class="12u$" name="corpo" id="corpo">{{$conteudo['corpo']}}</textarea>
</div>
<button type="submit" class="button small submit">Salvar
</form>