php - 此收款实例支付刀片上不存在属性 [id]
问题描述
有没有人知道这个错误:
Property [id] does not exist on this collection instance. (View: D:\projet7899\laravel-only-school-managemnt\resources\views\backend\payment\edit.blade.php)
付款/edit.blade.php
<div class="table w-full mt-8 bg-white rounded">
<form action="{{ route('payment.update',$payment->id) }}" method="POST" class="w-full max-w-xl px-6 py-12">
@csrf
有人有想法吗?提前致谢
解决方案
Double check your controller is returning a model instance for $payment
instead of a collection. For example, use ->first()
instead of ->get()
.
推荐阅读
- android - 使用itext库创建pdf时如何打印卢比sumbol?
- node.js - 用户在express js中登录时如何更新令牌?
- apache2 - 使用域名访问 nagios 3 Web 界面
- javascript - 角度模式形式的模态...... $scope 的问题
- ionic-framework - 在 Ionic 中显示日期和时间
- java - Firebase 身份验证快速入门需要 Kotlin
- ios - 上传图片:在不损失质量的情况下降低分辨率(Swift)
- apache-spark-sql - 如何根据另一列选择特定行?
- python - pyexcel / openpyxl TypeError: __init__() 得到了一个意外的关键字参数“noTextEdit”
- java - 使用反射调用具有参数的内部类方法