blessing-skin-server/app/Http/Middleware/ConvertEmptyStringsToNull.php
2019-05-05 20:04:36 +08:00

26 lines
542 B
PHP

<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull as Converter;
class ConvertEmptyStringsToNull extends Converter
{
protected $excepts = [
'admin/options',
'admin/score',
'admin/resource',
'admin/customize',
];
public function handle($request, Closure $next)
{
if (in_array($request->path(), $this->excepts)) {
return $next($request);
}
return parent::handle($request, $next);
}
}