找不到'post:upload/edit'的路由。
// in Routes.php
$routes->get('upload', 'UploadController::index');
$routes->add('upload', 'UploadController::create');
$routes->add('upload/edit/(:segment)', 'UploadController::edit/$1');
// in upload/index.php
<form action="<?= base_url('upload/edit/'.user()->userid) ?>" method="post">
在Routes.php中使用此代码。它对我有效。
//Routes.php
$routes->post('pload/edit/(:any(',[UploadController::class,'edit/$1'](;