Я попытался сохранить все данные формы как метод post в маршрут в методе post, выдав ошибку, как показано ниже
Метод POST не поддерживается для этого маршрута.Поддерживаемые методы: GET, HEAD.
пожалуйста, посмотрите на приведенный ниже код
web.php
Route::get('/purchase/index','PurchasesController@index')->name('purchase.index');
Route::get('/purchase/create','PurchasesController@create')->name('purchase.create');
Route::post('/purchase/store','PurchasesController@store')->name('purchase.store');
create.blade.php
@extends('layouts.nav') @section('content')
<div class="container mt-3 border ">
<div class="row justify-content-center align-items-center" style="background-color:teal;color:#fff;">
<h1> Purchase Details</h1>
</div>
{!!Form::open(['route'=>['purchase.store'],'id'=>'purchase_form','method'=>'POST'])!!}
<div class="container">
<div class="row float-left m-3">
{{-- {!!Form::open(['route'=>['purchase.store'],'id'=>'purchase_form','method'=>'POST'])!!} --}}
<form>
Date:
<input type="date" date-format="mm-dd-yyyy" placeholder="MM-DD-YYYY" name="date" id="datePicker">
</form>
</div>
<!-- <div class="col-sm-4 pull-right " style="margin-top:5px;margin-bottom:5px;">-->
<div class="row justify-content-center float-right m-3">
<button type="button" class="btn btn-info add-new" id="addnew"><i class="fa fa-plus"></i> Add New</button>
</div>
</div>
<div class="container mt-3">
<form method="POST" action=" ">
<table class="table table-bordered" id="tb2">
<thead class="text-center">
<tr class="tr-header">
<th>CI No</th>
<th>ItemName</th>
<th>Unit</th>
<th>Price</th>
<th>SubTotal</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td class="clid"></td>
<td>
<input type="text" class="form-control name" name="name" id="inputGroupSelect01">
</td>
<td>
<input type="text" class="form-control qty" name="qty" id="qty">
</td>
<td>
<input type="text" class="form-control rate" name="rate" id="rate">
</td>
<td>
<input type="text" class="form-control subTotal" name="subTotal" id="subTotal">
</td>
<td> <a class="delete" title="Delete" data-toggle="tooltip"><i class="material-icons"></i></a> </td>
</tr>
</tbody>
</table>
</div>
<div class="float-right m-3">
{{-- {!!Form::submit('Submit');!!} --}}
<form method="POST" action="/purchase/store">
<button type="submit" name="edit" class="btn btn-primary ">Submit</button>
</form>
</div>
<div class=" float-right m-3">
<h5><b>Grand Total</b></h5>
<input type="text-box" class="grandTotal" maxlength="10" size="10">
</div>
</div>
</div>
{!!Form::close()!!} @stop
PurchasesController.php
public function store(Request $request)
{
//
return "i have entered store";
}