REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 3.80 KB
Close
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php
Text
Base64
<?php namespace Illuminate\Foundation\Exceptions\Renderer; use Illuminate\Contracts\View\Factory; use Illuminate\Foundation\Exceptions\Renderer\Mappers\BladeMapper; use Illuminate\Http\Request; use Illuminate\Support\Collection; use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer; use Throwable; class Renderer { /** * The path to the renderer's distribution files. * * @var string */ protected const DIST = __DIR__.'/../../resources/exceptions/renderer/dist/'; /** * The view factory instance. * * @var \Illuminate\Contracts\View\Factory */ protected $viewFactory; /** * The exception listener instance. * * @var \Illuminate\Foundation\Exceptions\Renderer\Listener */ protected $listener; /** * The HTML error renderer instance. * * @var \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer */ protected $htmlErrorRenderer; /** * The Blade mapper instance. * * @var \Illuminate\Foundation\Exceptions\Renderer\Mappers\BladeMapper */ protected $bladeMapper; /** * The application's base path. * * @var string */ protected $basePath; /** * Creates a new exception renderer instance. * * @param \Illuminate\Contracts\View\Factory $viewFactory * @param \Illuminate\Foundation\Exceptions\Renderer\Listener $listener * @param \Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer $htmlErrorRenderer * @param \Illuminate\Foundation\Exceptions\Renderer\Mappers\BladeMapper $bladeMapper * @param string $basePath * @return void */ public function __construct( Factory $viewFactory, Listener $listener, HtmlErrorRenderer $htmlErrorRenderer, BladeMapper $bladeMapper, string $basePath, ) { $this->viewFactory = $viewFactory; $this->listener = $listener; $this->htmlErrorRenderer = $htmlErrorRenderer; $this->bladeMapper = $bladeMapper; $this->basePath = $basePath; } /** * Render the given exception as an HTML string. * * @param \Illuminate\Http\Request $request * @param \Throwable $throwable * @return string */ public function render(Request $request, Throwable $throwable) { $flattenException = $this->bladeMapper->map( $this->htmlErrorRenderer->render($throwable), ); return $this->viewFactory->make('laravel-exceptions-renderer::show', [ 'exception' => new Exception($flattenException, $request, $this->listener, $this->basePath), ])->render(); } /** * Get the renderer's CSS content. * * @return string */ public static function css() { return (new Collection([ ['styles.css', []], ['light-mode.css', ['data-theme' => 'light']], ['dark-mode.css', ['data-theme' => 'dark']], ]))->map(function ($fileAndAttributes) { [$filename, $attributes] = $fileAndAttributes; return '<style '.(new Collection($attributes))->map(function ($value, $attribute) { return $attribute.'="'.$value.'"'; })->implode(' ').'>' .file_get_contents(static::DIST.$filename) .'</style>'; })->implode(''); } /** * Get the renderer's JavaScript content. * * @return string */ public static function js() { $viteJsAutoRefresh = ''; $vite = app(\Illuminate\Foundation\Vite::class); if (is_file($vite->hotFile())) { $viteJsAutoRefresh = $vite->__invoke([]); } return '<script>' .file_get_contents(static::DIST.'scripts.js') .'</script>'.$viteJsAutoRefresh; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Mappers
DIR
-
drwxrwxrwx
2025-09-17 06:52:55
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Exception.php
5.81 KB
lrw-rw-rw-
2025-09-17 06:52:55
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Frame.php
3.67 KB
lrw-rw-rw-
2025-09-17 06:52:55
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Listener.php
1.99 KB
lrw-rw-rw-
2025-09-17 06:52:55
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Renderer.php
3.80 KB
lrw-rw-rw-
2025-09-17 06:52:55
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).