REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 2.53 KB
Close
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php
Text
Base64
<?php namespace Illuminate\Foundation\Http\Middleware; use Closure; use Illuminate\Support\Arr; use Illuminate\Support\Str; class TrimStrings extends TransformsRequest { /** * The attributes that should not be trimmed. * * @var array<int, string> */ protected $except = [ 'current_password', 'password', 'password_confirmation', ]; /** * The globally ignored attributes that should not be trimmed. * * @var array */ protected static $neverTrim = []; /** * 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) { $except = array_merge($this->except, static::$neverTrim); if ($this->shouldSkip($key, $except) || ! is_string($value)) { return $value; } return Str::trim($value); } /** * Determine if the given key should be skipped. * * @param string $key * @param array $except * @return bool */ protected function shouldSkip($key, $except) { return in_array($key, $except, true); } /** * Indicate that the given attributes should never be trimmed. * * @param array|string $attributes * @return void */ public static function except($attributes) { static::$neverTrim = array_values(array_unique( array_merge(static::$neverTrim, Arr::wrap($attributes)) )); } /** * Register a callback that instructs the middleware to be skipped. * * @param \Closure $callback * @return void */ public static function skipWhen(Closure $callback) { static::$skipCallbacks[] = $callback; } /** * Flush the middleware's global state. * * @return void */ public static function flushState() { static::$neverTrim = []; static::$skipCallbacks = []; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Concerns
DIR
-
drwxrwxrwx
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CheckForMaintenanceMode.php
139 B
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ConvertEmptyStringsToNull.php
1.34 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HandlePrecognitiveRequests.php
2.39 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InvokeDeferredCallbacks.php
1.02 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PreventRequestsDuringMaintenance.php
4.87 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TransformsRequest.php
2.05 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TrimStrings.php
2.53 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ValidateCsrfToken.php
169 B
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ValidatePostSize.php
174 B
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
VerifyCsrfToken.php
6.36 KB
lrw-rw-rw-
2025-09-17 06:52:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).