Ich erhalte diese Fehlermeldung:UrlGenerationException: Fehlende erforderliche Parameter für [Route: topics.update] [URI: Themen/{Thema}]
Missing required parameters for [Route: topics.update] [URI: topics/{topic}]. (View: C:\xampp\htdocs\phpboards\resources\views\topics\edit.blade.php)
Dies ist Link, der Benutzer nehmen zu bearbeiten:
<a href="/boards/topics/edit/{{$topic->id}}" class="btn btn-default">Edit</a>
Dies ist der Controller für edit:
$topic = Topic::find($id);
return view('topics.edit')->with('topic', $topic);
Dies ist die Route:
DieseRoute::get('/boards/topics/edit/{id}', '[email protected]');
ist die Form für edit:
<div class="container">
{!! Form::open(['action' => '[email protected]', 'method' => 'POST']) !!}
<div class="form-group">
{{ Form::label('title', 'Title') }}
{{ Form::text('title', $topic->topic_title, ['class' => 'form-control', 'placeholder' => 'Title of the Post']) }}
</div>
<div class="form-group">
{{ Form::label('desc', 'Desc') }}
{{ Form::textarea('desc', $topic->topic_body, ['class' => 'form-control', 'placeholder' => 'Description of the Post']) }}
</div>
{{ Form::submit('Submit', ['class' => 'btn btn-default']) }}
{!! Form::close() !!}
</div>
Was ich hier falsch gemacht haben ??
@ParantapParashar Aber wofür ?? und für welche Steuerung ?? –
Es gibt so viele Fehler in Ihrem Code. –
Ich denke, du musst hier deine Update-Methode und Route angeben. –