jeudi 28 décembre 2017

Laravel 5.5 routes order error

I installed fresh version of Laravel 5.5 and this is some issue with web routes ordering:

<?php


Route::get('/', function () {
    return view('welcome');
});

Auth::routes();



Route::group(['prefix' => 'respond'], function () {


      Route::get('/{quiz}', 'RespondentController@show')
     ->middleware('auth');


      Route::get('/save_answer2', 'RespondentController@save_answer2')
     ->middleware('auth');


});

route /save_answer2 - error 404

if we change the order of routing and route /save_answer2 wiil be above /{quiz} everything will be ok. Why is this? Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire