Routing -NotFoundHttpException in RouteCollection.php line 161:
Hi,
I get this error when I try to access delayTime method. I can't see what I am doing wrong.
I have the routes setup like this:
Route::post('quiz', [ 'as' => 'quiz', 'uses' => 'QuizController@create' ]);
Route::get('quiz/token/{quizByToken}', [ 'as' => 'quiz.token', 'uses' => 'QuizController@getQuizByToken' ]);
Route::get('quiz/code/{quizByCode}', [ 'as' => 'quiz.code', 'uses' => 'QuizController@getQuizByCode' ]);
Route::get('quiz/id/{quiz}/players', [ 'as' => 'quiz.players', 'uses' => 'QuizController@getQuizPlayers' ]);
Route::get('quiz/token/{quizByToken}/players/highscore', [ 'as' => 'quizzes.player.highscore', 'uses' => 'PlayerController@highscore' ]);
Route::put('quiz/nextQuestion/{quizByToken}', [ 'as' => 'quizzes.nextQuestion', 'uses' => 'QuizController@nextQuestion' ]);
Route::get('quiz/poll/{quiz}', [ 'as' => 'quizzes.poll', 'uses' => 'QuizController@currentQuestion' ]);
Route::put('quiz/poll/token/{quizByToken}/delay-current/{delayTime}', [ 'as' => 'quizzes.delayTime', 'uses' => 'QuizController@delayTime' ]);
This is the normal 404 NotFoundHttpException for routes. Have to check if you are trying to access this using the right way.
- Check if you is really using PUT when accessing this URL.
- Check for typo errors at the code you are using to reach this URL.
- Check for typo errors at your QuizController
I've copied and pasted this on my application and it's working normally.
What URL are you accessing?
- What is the actual URL that you're accessing denoted by the route
quiz/poll/token/{quizByToken}/delay-current/{delayTime}
- Is it a PUT request? Or a GET request?
I was passing the parameter in a wrong way, stupid mistake, thank you anyway!
Please or to participate in this conversation.