1
嗨,我正在学习树枝,我卡住了。它不检查表单是否被提交,所以我的猜测是不正确的。 任何人都可以指点我一个正确的方式。苗条树枝检查方法=张贴
{% if method == 'POST' %}
Method posted
{% endif %}ˇ
我get函数
$app->get('/p/:id', function ($id) use ($app) {
$pDItem = $app->pD->where('id', $id)->first();
if (!$pDItem) {
$app->notFound();
}
$app->render('pD/pDItem.php', [
'pDItem' => $pDItem,
'method' => $app->request->getMethod()
]);
})->name('pD.item');
-