请问laravel11如何禁用convertemptystringstonull中间件? | laravel | laravel china 社区-金年会app官方网
请问laravel11如何禁用convertemptystringstonull中间件?
请问laravel11如何禁用convertemptystringstonull中间件?
// app.php
return application::configure(basepath: dirname(__dir__))
->withrouting(
web: __dir__.'/../routes/web.php',
api: __dir__.'/../routes/api.php',
commands: __dir__.'/../routes/console.php',
health: '/up',
)
->withmiddleware(function (middleware $middleware) {
$middleware->validatecsrftokens([
'upload'
]);
$middleware->web([
\app\http\middleware\crossoriginmiddleware::class
]);
$middleware->remove([
convertemptystringstonull::class,
]);
})
->withexceptions(function (exceptions $exceptions) {
//
})->create();
全新安装的 11 估计这些配置都没有了, 我感觉大可不必, 经常用的没必要省略.