mercredi 27 décembre 2017

UrlGenerationException: Missing required parameters for [Route: topics.update] [URI: topics/{topic}]

I'm getting this error:

Missing required parameters for [Route: topics.update] [URI: topics/{topic}]. (View: C:\xampp\htdocs\phpboards\resources\views\topics\edit.blade.php)

This is link that will take user to edit:

<a href="/boards/topics/edit/" class="btn btn-default">Edit</a>

This is the controller for edit:

$topic = Topic::find($id);
return view('topics.edit')->with('topic', $topic);

This is the Route:

Route::get('/boards/topics/edit/{id}', 'TopicController@edit');

This is the form for edit:

<div class="container">
    {!! Form::open(['action' => 'TopicController@update', 'method' => 'POST']) !!}
        <div class="form-group">
            
            
        </div>
        <div class="form-group">
            
            
        </div>
        
    {!! Form::close() !!}
</div>

What i have done wrong here??



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2CdMMek
via IFTTT

Aucun commentaire:

Enregistrer un commentaire