mercredi 21 juin 2017

Laravel No query results for model [App\Topic] create

I'm trying to get a view where the user is able to create a topic. I did this many times in my project but never got this error, Because all of the other ones work just fine.

I get the error No query results for model [App\Topic] create. Here is the code.

This is the link that is supposed to bring the user to the view.

        <div class="col s12">
            <div class="card">
                <div class="card-content clearfix">
                    <a href="" class="waves-effect waves-light btn blue-grey darken-4">New topic <i class="material-icons right">edit</i></a>
                </div>
            </div>
        </div>

These are the routes that are used in this problem.

Route::get('/theme/{theme_id}/topics/create', 'TopicsController@create')->name('createtopic');
Route::post('/theme/{theme_id}/topics/create', 'TopicsController@store')->name('savetopic');

The Controller method create.

dd('Hij is er ' . $id);

And the store method is empty, The link doesn't show the DumpDie method but shows me the error instead. So there is no need to post the view i'm trying to display because that's not where the problem is. Thanks in advance!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire