@foreach($products as $product)
<tr>
<td>{{ $product->id }}</td>
<td>{{ $product->name }}</td>
<td>{{ $product->job_category }}</td>
<td>{{ $product->purpose }}</td>
<td>{{ $product->region }}</td>
<td>{{ $product->email }}</td>
<td>{{ $product->contact }}</td>
<td><a href="{{ route('$products.edit', $product->id) }}" class="btn btn-primary">Edit</a></td>
<td>
<form action="{{ route('$products.destroy', $product->id) }}" method="post">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit">DELETE</button>
</form>
</td>
</tr>
@endforeach
这是我的产品控制器
$product = Product::findOrFail($id);
return view('products.edit', compact('product'));
这是我的路线
Route::resource('products', 'ProductController');