0π
β
- Remove
@click
from submit buttom. - Remove route⦠from form action and set it #
- Add
@submit="addCategory()"
to the form - In the
axios.post
samply add the route without route function.
Update:
If you want to prevent page refreshing, add .prevent
after @submit
.
Source:stackexchange.com