TrimStrings
class TrimStrings extends TransformsRequest (View source)
Properties
Methods
void
cleanParameterBag(ParameterBag $bag)
Clean the data in the parameter bag.
from
TransformsRequest
array
cleanArray(array $data, string $keyPrefix = '')
Clean the data in the given array.
from
TransformsRequest
mixed
transform(string $key, mixed $value)
Transform the given value.
bool
shouldSkip(string $key, array $except)
Determine if the given key should be skipped.
static void
except(array|string $attributes)
Indicate that the given attributes should never be trimmed.
static void
static void
flushState()
Flush the middleware's global state.
Details
static void
except(array|string $attributes)
Indicate that the given attributes should never be trimmed.
static void
skipWhen(Closure $callback)
Register a callback that instructs the middleware to be skipped.