Reputation: 1
I'm trying to create an input form but couldn't find the solution from the error
I've tried some tips online but it still won't work
Upvotes: 0
Views: 60
Reputation: 1
Sorry, got the answer
Route::post('CreateItem','CreateItem@insert'); to Route::post('/create_item','CreateItem@insert');
and
class CreateItem extends Controller
in my question, I typed the wrong controller name, it should be CreateItem
Thanks for the effort to answer my question tho..
Upvotes: 0
Reputation: 126
I think is related to the route name. Have you check which uri is posting the form? Can you try:
Route::post('/createItem', function () {
//
})->name('createItem');
Upvotes: 0
Reputation: 296
It's because your route name is not defined. you should add the route name like this
Route::post('CreateItem', 'CreateItem@insert')->name('CreateItem');
Upvotes: 2