Laravel 8 Form Submit does not submit, unexpected behavior occurs

  forms, laravel, laravel-8, php

I am trying to create a form submit but I bumped to a unexpected scenario.

  • When form submitted by clicking the submit button
  • The web app reroute to my index page of the resource route
  • With the form variable and values appended in the URL.


URL before submitting:

URL after submitted:

View (create.blade.php)

<form type="POST" name="productAddForm" action="{{ route('')  }}" >
    <div class="mb-3 col-5">
         <label for="productTitle" class="form-label">Title</label>
         <input name="productTitle" type="text" class="form-control" id="productTitle">
    <div class="mb-3 col-5">
         <label for="productPrice" class="form-label">Price</label>
         <input name="productPrice" type="number" class="form-control" id="productPrice">
    <button type="submit" class="btn btn-primary">Save</button>

Controller (ProductController.php)

public function create()
    return view('layouts/admin/product.create');

public function store(Request $request)

Route (web.php)

Route::resource('admin/products', ProductController::class)->middleware('auth');

Source: Ask PHP