Solution 1 :

Create a route in resources/routes/web.php:

Route::post( '/submit', '[email protected]' );

Then edit your form:

<form method="POST" action="/submit">

Solution 2 :

It seems like you forgot to Define the route did you do:

    Route::get('posts', '[email protected]');

Problem :

I’ve created a from within a laravel vue component which I’m trying to submit, but I’m getting a 404 error [email protected] not found.

<form method="POST" action="{{ action('[email protected]') }}">

How do I correctly submit a form within the vue component?

Comments

Comment posted by Joe Leeson

I’m getting an error from this: action=”{{ route(‘storeEntry’) }}”: Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of

, use

.

Comment posted by Robin Gillitzer

Try to type the relative path in your action. Like that: action=„submit/path“. The same path as the first attribute of Route::get()

Comment posted by Robin Gillitzer

Your form is in a *.vue file not in a *.blade.php file right?

Comment posted by github.com/tightenco/ziggy

In order to use laravel named routes in your

Comment posted by Joe Leeson

Yes form in a .vue file

By