I\'ve just started learning the Laravel framework and I\'m having an issue with routing.
The only route that\'s working is the default home route that\'s attached to
Have you tried adding this to your routes file instead Route::get('user', "user@index")
?
The piece of text before the @
, user
in this case, will direct the page to the user controller and the piece of text after the @
, index
, will direct the script to the user
function public function get_index()
.
I see you're using $restful
, in which case you could set your Route
to Route::any('user', 'user@index')
. This will handle both POST
and GET
, instead of writing them both out separately.