2019-03-20 11:49:17 +08:00
|
|
|
<?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',
|
2019-05-05 20:04:36 +08:00
|
|
|
'admin/customize',
|
2019-03-20 11:49:17 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
public function handle($request, Closure $next)
|
|
|
|
{
|
|
|
|
if (in_array($request->path(), $this->excepts)) {
|
|
|
|
return $next($request);
|
|
|
|
}
|
|
|
|
|
|
|
|
return parent::handle($request, $next);
|
|
|
|
}
|
|
|
|
}
|