How to use the ROUTE helper?


I have this line of code to process an update

<form action="{{ '/user/' + }}" method="POST">

nevertheless I would like to use the route() helper in order to achieve a better and more concise usage about writting routes

I have tried this but it doesnt works

<form action="{{ route('UserController'+ }}" method="POST">

When I try to process an update, I have this error

Route not found /user/modificar/null

What can I do?


Hey Shadow. Do the following.

Go to start/routes.js and define a route, ex:

Route.get('users/:id', 'UserController.methodName').as('users.find')

Now you may use this route in the following way:

{{ route('users.find', { id: }) }}


thanks a lot bro well done