所以,由于某种原因,我得到一个错误异常,我找不到错误。这是我的控制器(Posts :: table ='table')和(Posts :: PK ='id')
public function edit(int $postId): View
{
$post = app('db')
->table(Posts::TABLE)
->select(
'*'
)
->where(Posts::PK, $postId)
->first();
$title = $this->_titleEdit;
return view('posts.edit', compact(
'post',
'title'
));
}
这是我的观点。
<form action="<?=route('posts.update',['postId' => $postId]) ?>" method="post">