PATH:
home
/
lab2454c
/
tripvare.com
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Foundation
/
Http
/
Middleware
<?php namespace Illuminate\Foundation\Http\Middleware; use Closure; class ConvertEmptyStringsToNull extends TransformsRequest { /** * All of the registered skip callbacks. * * @var array */ protected static $skipCallbacks = []; /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { foreach (static::$skipCallbacks as $callback) { if ($callback($request)) { return $next($request); } } return parent::handle($request, $next); } /** * Transform the given value. * * @param string $key * @param mixed $value * @return mixed */ protected function transform($key, $value) { return is_string($value) && $value === '' ? null : $value; } /** * Register a callback that instructs the middleware to be skipped. * * @param \Closure $callback * @return void */ public static function skipWhen(Closure $callback) { static::$skipCallbacks[] = $callback; } }
[-] CheckForMaintenanceMode.php
[edit]
[-] TrimStrings.php
[edit]
[+]
..
[-] TransformsRequest.php
[edit]
[-] PreventRequestsDuringMaintenance.php
[edit]
[-] ConvertEmptyStringsToNull.php
[edit]
[-] ValidatePostSize.php
[edit]
[-] VerifyCsrfToken.php
[edit]