Route mapping issue – get wrong function

The sequence in routes/web.php do effect the result and map to a wrong function.

Solution:

This is because var id has no specific data type so “login” in this path “/member/login” will be passed to function login as a parameter.

    Route::get('/{id}', 'Front\[email protected]')
        ->where('id', '[0-9]+');

https://laravel.com/docs/5.1/routing?fbclid=IwAR3AtLACEAYNy43usFklrMVxrsfaTbaKPqn_Jq-FGQX6RUgbyr9Qg_ZbBlA#parameters-regular-expression-constraints