Support the ongoing development of Laravel.io →
Configuration Requests Views
Last updated 2 years ago.
0

On your browser just go to below address:

http://localhost:8000/users/test

Last updated 2 years ago.
0

I am having the exact same issue as this and cannot work out why an exception is being thrown. Did navigating to the URL work for you?

Last updated 2 years ago.
0

what is the output of

$ php artisan routes
Last updated 2 years ago.
0

I have just deleted the files I created to route to and started again and the controller appears to be functional now, I am unsure as to why.

Last updated 2 years ago.
0
+--------+----------------------------------------------------------+------+----
------------------------------+----------------+---------------+
| Domain | URI                                                      | Name | Act
ion                           | Before Filters | After Filters |
+--------+----------------------------------------------------------+------+----
------------------------------+----------------+---------------+
|        | GET index/{one?}/{two?}/{three?}/{four?}/{five?}         |      | Use
rsController@getIndex         |                |               |
|        | GET /                                                    |      | Use
rsController@getIndex         |                |               |
|        | GET registration/{one?}/{two?}/{three?}/{four?}/{five?}  |      | Use
rsController@getRegistration  |                |               |
|        | POST registration/{one?}/{two?}/{three?}/{four?}/{five?} |      | Use
rsController@postRegistration |                |               |
|        | GET login/{one?}/{two?}/{three?}/{four?}/{five?}         |      | Use
rsController@getLogin         |                |               |
|        | POST login/{one?}/{two?}/{three?}/{four?}/{five?}        |      | Use
rsController@postLogin        |                |               |
|        | GET dashboard/{one?}/{two?}/{three?}/{four?}/{five?}     |      | Use
rsController@getDashboard     |                |               |
|        | POST logout/{one?}/{two?}/{three?}/{four?}/{five?}       |      | Use
rsController@postLogout       |                |               |
|        | GET {_missing}                                           |      | Use
rsController@missingMethod    |                |               |
|        | GET login/test/{one?}/{two?}/{three?}/{four?}/{five?}    |      | Pro
filesController@getTest       |                |               |
|        | GET login/{_missing}                                     |      | Pro
filesController@missingMethod |                |               |
+--------+----------------------------------------------------------+------+----
------------------------------+----------------+---------------+
Last updated 2 years ago.
0
Solution

Routes are First In First Out, sometimes the order of registering them matters make sure your deep routes come first. For instance:

Route::controller('/','IndexController');
Route::controller('users','UsersController');

The above code will throw the same error when you will try to access /user route... the correct order is:

Route::controller('users','UsersController');
Route::controller('/','IndexController');
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

rasparac rasparac Joined 18 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.