缺少 [Route: Kategori.destroy] [URI: Model/Kategori/{Kategori}] 所需的参数
Missing required parameters for [Route: Kategori.destroy] [URI: Model/Kategori/{Kategori}]
<a href="{{ route('Kategori.edit', $d->id) }}" class="dropdown-item">Edit</a> <a href="{{ route('Kategori.destroy', $d->id) }}" class="dropdown-item">Delete</a>
编辑成功但销毁失败
我用资源路由所有段都成功,只有路由Category.destroy这个不成功。克服后出现白屏
假设您使用 HTTP DELETE
作为路由,删除应该是一个表单提交:
<form action="{{ route('Kategori.destroy', $d->id) }}" method="POST">
@csrf
@method('DELETE')
<button type="submit">
Delete
</button>
</form>
<a href="{{ route('Kategori.edit', $d->id) }}" class="dropdown-item">Edit</a> <a href="{{ route('Kategori.destroy', $d->id) }}" class="dropdown-item">Delete</a>
编辑成功但销毁失败
我用资源路由所有段都成功,只有路由Category.destroy这个不成功。克服后出现白屏
假设您使用 HTTP DELETE
作为路由,删除应该是一个表单提交:
<form action="{{ route('Kategori.destroy', $d->id) }}" method="POST">
@csrf
@method('DELETE')
<button type="submit">
Delete
</button>
</form>