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

Routes are executed in the order they're listed in your routes.php file. As soon as the first matching route is found, it doesn't go through the rest.

In this case, it's most likely that this line:

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

is taking the request, and is not able to find a matching function in your controller.

You either need to move this line up:

Route::get('users/{all}/edit', 'UsersController@getEdit');

or edit your controller so the edit function matches the route pattern, for example by specifying the parameter:

public function getEdit($id)
    {
        return "editing" . $id;
    }

... would be executed if you went to users/edit/1234 in your browser.

Last updated 2 years ago.
0

edit: Route::get('users/{all}/edit', 'UsersController@getEdit')->where('all','[0-9]+');

0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.