Eyika \ Atom \ Framework \ Exceptions \ Http \ NotFoundHttpException (404)
Requested resource not found Eyika\Atom\Framework\Exceptions\Http\NotFoundHttpException thrown with message "Requested resource not found" Stacktrace: #29 Eyika\Atom\Framework\Exceptions\Http\NotFoundHttpException in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Route.php:372 #28 Eyika\Atom\Framework\Http\Route:handleNotFound in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Route.php:184 #27 Eyika\Atom\Framework\Http\Route:{closure:Eyika\Atom\Framework\Http\Route::dispatch():181} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/SubstituteBindings.php:28 #26 Eyika\Atom\Framework\Http\Middlewares\SubstituteBindings:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #25 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/VerifyCsrfToken.php:25 #24 App\Http\Middlewares\VerifyCsrfToken:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #23 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/EncryptCookies.php:39 #22 App\Http\Middlewares\EncryptCookies:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #21 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/ShareErrorsFromSession.php:24 #20 Eyika\Atom\Framework\Http\Middlewares\ShareErrorsFromSession:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #19 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/StartSession.php:24 #18 Eyika\Atom\Framework\Http\Middlewares\StartSession:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #17 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/ServePublicAssets.php:55 #16 Eyika\Atom\Framework\Http\Middlewares\ServePublicAssets:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #15 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/Xss.php:24 #14 App\Http\Middlewares\Xss:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #13 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/ConvertEmptyStringsToNull.php:20 #12 Eyika\Atom\Framework\Http\Middlewares\ConvertEmptyStringsToNull:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #11 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/TrimStrings.php:22 #10 App\Http\Middlewares\TrimStrings:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #9 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/ValidatePostSize.php:25 #8 Eyika\Atom\Framework\Http\Middlewares\ValidatePostSize:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #7 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/PreventRequestsDuringMaintenance.php:44 #6 App\Http\Middlewares\PreventRequestsDuringMaintenance:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #5 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/TrustProxies.php:48 #4 App\Http\Middlewares\TrustProxies:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:83 #3 Eyika\Atom\Framework\Http\Pipeline:{closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72} in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php:58 #2 Eyika\Atom\Framework\Http\Pipeline:run in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Route.php:194 #1 Eyika\Atom\Framework\Http\Route:dispatch in /home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Server.php:61 #0 Eyika\Atom\Framework\Http\Server:handle in /home/u694026900/domains/backtestfx.com/public_html/api_dev/public/index.php:66
Stack frames (30)
29
Eyika\Atom\Framework\Exceptions\Http\NotFoundHttpException
/vendor/eyika/atom-framework/src/Http/Route.php:372
28
Eyika\Atom\Framework\Http\Route handleNotFound
/vendor/eyika/atom-framework/src/Http/Route.php:184
27
Eyika\Atom\Framework\Http\Route {closure:Eyika\Atom\Framework\Http\Route::dispatch():181}
/vendor/eyika/atom-framework/src/Http/Middlewares/SubstituteBindings.php:28
26
Eyika\Atom\Framework\Http\Middlewares\SubstituteBindings handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
25
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/app/Http/Middlewares/VerifyCsrfToken.php:25
24
App\Http\Middlewares\VerifyCsrfToken handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
23
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/app/Http/Middlewares/EncryptCookies.php:39
22
App\Http\Middlewares\EncryptCookies handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
21
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/vendor/eyika/atom-framework/src/Http/Middlewares/ShareErrorsFromSession.php:24
20
Eyika\Atom\Framework\Http\Middlewares\ShareErrorsFromSession handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
19
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/vendor/eyika/atom-framework/src/Http/Middlewares/StartSession.php:24
18
Eyika\Atom\Framework\Http\Middlewares\StartSession handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
17
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/vendor/eyika/atom-framework/src/Http/Middlewares/ServePublicAssets.php:55
16
Eyika\Atom\Framework\Http\Middlewares\ServePublicAssets handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
15
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/app/Http/Middlewares/Xss.php:24
14
App\Http\Middlewares\Xss handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
13
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/vendor/eyika/atom-framework/src/Http/Middlewares/ConvertEmptyStringsToNull.php:20
12
Eyika\Atom\Framework\Http\Middlewares\ConvertEmptyStringsToNull handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
11
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/app/Http/Middlewares/TrimStrings.php:22
10
App\Http\Middlewares\TrimStrings handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
9
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/vendor/eyika/atom-framework/src/Http/Middlewares/ValidatePostSize.php:25
8
Eyika\Atom\Framework\Http\Middlewares\ValidatePostSize handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
7
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/app/Http/Middlewares/PreventRequestsDuringMaintenance.php:44
6
App\Http\Middlewares\PreventRequestsDuringMaintenance handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
5
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/app/Http/Middlewares/TrustProxies.php:48
4
App\Http\Middlewares\TrustProxies handle
/vendor/eyika/atom-framework/src/Http/Pipeline.php:83
3
Eyika\Atom\Framework\Http\Pipeline {closure:{closure:Eyika\Atom\Framework\Http\Pipeline::carry():71}:72}
/vendor/eyika/atom-framework/src/Http/Pipeline.php:58
2
Eyika\Atom\Framework\Http\Pipeline run
/vendor/eyika/atom-framework/src/Http/Route.php:194
1
Eyika\Atom\Framework\Http\Route dispatch
/vendor/eyika/atom-framework/src/Http/Server.php:61
0
Eyika\Atom\Framework\Http\Server handle
/public/index.php:66
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Route.php
        } elseif (is_array($callback) && count($callback) > 1) {
            [$controller, $method] = $callback;
            $controllerInstance = new $controller;
            return call_user_func_array([$controllerInstance, $method], array_merge([$request], array_values($parameters)));
        } elseif (is_string($callback)) {
            return include_once __DIR__ . "/$callback";
        } else {
            throw new NotFoundHttpException('Route not found');
        }
    }
 
    // Handle 404 Not Found
    protected static function handleNotFound($request)
    {
        if (isset(self::$routes['ANY']['/404'])) {
            $callback = self::$routes['ANY']['/404']['callback'];
            return self::executeCallback($callback, $request, []);
        }
 
        throw new NotFoundHttpException('Requested resource not found');
    }
}
 
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Route.php
        foreach (self::$routes[$requestMethod] ?? [] as $route => $data) {
            if (self::matchesRoute($route, $requestUri, $parameters)) {
                $request->route_params = Arr::wrap(sanitize_data($parameters));
                self::$currentRoute = $route;
                $routeMatched = true;
                break;
            }
        }
    
        // Set up the middleware pipeline
        $middlewares = array_merge(
            static::$defaultMiddlewares,
            static::findRouteMiddlewares($requestMethod, $requestUri)
        );
    
        // Core handler for the pipeline
        $coreHandler = function ($request) use ($routeMatched, $requestMethod, $requestUri) {
            // If no route matches, set up a 404 handler
            if (!$routeMatched) {
                return self::handleNotFound($request)->send();
            }
            $callback = self::$routes[$requestMethod][self::$currentRoute]['callback'];
            return self::executeCallback($callback, $request, $request->route_params ?? []);
        };
    
        // Run the pipeline
        $response = (new Pipeline())
            ->through($middlewares)
            ->then($coreHandler)
            ->run($request);
    
        // Output the response
        if (!$response instanceof BaseResponse)
            $response = Response::plain(is_null($response) ? '' : (string)$response);
 
        return $response->send();
        // elseif (is_string($response)) {
        //     echo $response;
        //     return true;
        // } else return true;
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/SubstituteBindings.php
use Eyika\Atom\Framework\Http\Request;
use Eyika\Atom\Framework\Support\Arr;
use Eyika\Atom\Framework\Support\Database\Contracts\ModelInterface;
use Eyika\Atom\Framework\Support\Database\Contracts\UserModelInterface;
use Eyika\Atom\Framework\Support\NamespaceHelper;
 
class SubstituteBindings implements MiddlewareInterface
{
    /**
     * Handle an incoming request.
     *
     * @throws NotFoundHttpException
     */
    public function handle(Request $request, Closure $next, ...$ignoreKeys): BaseResponse
    {
        // Get the route parameters from the request
        $routeParams = $request->route_params;
 
        if (empty($routeParams))
            return $next($request);
 
        // Substitute bindings for each parameter
        foreach ($routeParams as $key => $value) {
            if (Arr::exists($ignoreKeys, $key))
                continue;
 
            if (is_numeric($value)) {
                $value = sanitize_data($value);
                // Example: replace `{user}` with an instance of User model
                $model = $this->resolveModel($key, $value);
                if ($model === null) {
                    continue;
                }
                if ($model) {
                    $routeParams[$key] = $model;
                } else {
                    throw new ModelNotFoundException("unable to retrieve $key with id $value");
                }
            }
        }
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/VerifyCsrfToken.php
use Eyika\Atom\Framework\Exceptions\Http\AccessDeniedHttpException;
use Eyika\Atom\Framework\Http\BaseResponse;
use Eyika\Atom\Framework\Http\Request;
use Eyika\Atom\Framework\Http\Contracts\MiddlewareInterface;
use Eyika\Atom\Framework\Support\Facade\Session;
 
class VerifyCsrfToken implements MiddlewareInterface
{
    /**
     * Handle an incoming request.
     *
     * @throws AccessDeniedHttpException
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        if ($this->shouldVerify($request)) {
            $this->verifyCsrfToken($request);
        }
 
        return $next($request);
    }
 
    /**
     * Determine if the CSRF token should be verified for the request.
     *
     * @param Request $request
     * @return bool
     */
    protected function shouldVerify(Request $request): bool
    {
        // List of paths that should not have CSRF verification
        $except = [
            '/excluded-route', // Example path to exclude
        ];
 
        foreach ($except as $pattern) {
            if ($this->match($pattern, $request->pathInfo())) {
                return false;
            }
        }
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/EncryptCookies.php
    protected array $except = [
        'PHPSESSID', // Add other session-related cookies here
        'XSRF-TOKEN', // Example: CSRF token cookie
    ];
 
    /**
     * Handle an incoming request.
     *
     * @param Request $request
     * @param Closure $next
     * @return BaseResponse
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        try {
            // Decrypt incoming request cookies
            $this->decryptCookies($request);
        
            // Process the request and get the response
            $response = $next($request);
        
            // Ensure `$response` is a valid `BaseResponse` object
            if (!$response instanceof BaseResponse) {
                throw new \UnexpectedValueException('Middleware expects a BaseResponse instance.');
            }
 
            // Encrypt cookies in the response
            $this->encryptCookies($response);
 
            // Return the processed response
            return $response;
        } catch (\Exception $e) {
            throw $e;
        }
    }
 
    /**
     * Decrypt cookies in the request.
     *
     * @param Request $request
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/ShareErrorsFromSession.php
use Closure;
use Eyika\Atom\Framework\Http\BaseResponse;
use Eyika\Atom\Framework\Http\Request;
use Eyika\Atom\Framework\Http\Contracts\MiddlewareInterface;
use Eyika\Atom\Framework\Support\Facade\Blade;
 
class ShareErrorsFromSession implements MiddlewareInterface
{
    /**
     * Handle an incoming request.
     *
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        // Share errors with the view
        if ($request->hasSession()) {
            $this->shareErrors($request);
        }
 
        return $next($request);
    }
 
    /**
     * Share errors from the session with the view.
     *
     * @param Request $request
     * @return void
     */
    protected function shareErrors(Request $request): void
    {
        $session = $request->getSession();
 
        if ($session->has(BaseResponse::REQUEST_ERRORS_KEY)) {
            $errors = $session->get(BaseResponse::REQUEST_ERRORS_KEY);
            $this->shareWithViews($errors);
            $session->unset(BaseResponse::REQUEST_ERRORS_KEY);
        }
        if ($session->has(BaseResponse::REQUEST_VALIDATION_ERRORS_KEY)) {
            $errors = $session->get(BaseResponse::REQUEST_VALIDATION_ERRORS_KEY);
            $this->shareValidationWithViews($errors);
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/StartSession.php
use Closure;
use Exception;
use Eyika\Atom\Framework\Http\BaseResponse;
use Eyika\Atom\Framework\Http\Request;
use Eyika\Atom\Framework\Http\Contracts\MiddlewareInterface;
use Eyika\Atom\Framework\Http\Session;
use Eyika\Atom\Framework\Support\Facade\Facade;
 
class StartSession  implements MiddlewareInterface
{
    /**
     * Handle an incoming request.
     *
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        if (strtolower($request->method()) !== "options") {
            $this->startSession($request);
        }
        return $next($request);
    }
 
    /**
     * Start the session for the request.
     *
     * @param Request $request
     * @return void
     */
    protected function startSession(Request $request)
    {
        if (!$request->hasSession()) {
            $session = $this->createSession();
            $request->setSession($session);
        }
 
        $request->getSession()->start();
    }
 
    /**
     * Save the session data after the response has been sent.
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/ServePublicAssets.php
                    }
                    $allowedOrigins = config('cors.allowed_origins', ['*']);
                    $origin = $request->headers('Origin');
 
                    $response = Response::setHeader("Content-Type", $mime, BaseResponse::STATUS_OK);
 
                    if ($allowedOrigins[0] === '*' || in_array($origin, $allowedOrigins)) {
                        $response->setHeader("Access-Control-Allow-Origin", '*');
                        $response->setHeader('Access-Control-Allow-Methods', "GET, OPTIONS");
                        $response->setHeader('Access-Control-Allow-Headers', "Content-Type");
                    }
 
                    return $response->body(file_get_contents($path));
                }
 
                return Response::plain("File Not Found", BaseResponse::STATUS_NOT_FOUND);
            }
        }
 
        return $next($request);
    }
}
 
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/Xss.php
use Closure;
use Eyika\Atom\Framework\Http\BaseResponse;
use Eyika\Atom\Framework\Http\Contracts\MiddlewareInterface;
use Eyika\Atom\Framework\Http\Request;
 
class Xss implements MiddlewareInterface
{
    /**
     * Handle an incoming request.
     *
     * @param Request $request
     * @return bool
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        // Sanitize the request inputs
        $request = $this->sanitizeInputs($request);
 
        // Proceed with the next middleware or request handler
        return $next($request);
    }
 
    /**
     * Sanitize request inputs to prevent XSS attacks.
     *
     * @param Request $request
     * @return Request
     */
    protected function sanitizeInputs(Request $request): Request
    {
        $data = $request->input(); // Get all POST data
        $data = $this->sanitize($data);
        $request->replaceInput($data); // Replace POST data with sanitized data
 
        $query = $request->query(); // Get all GET data
        $query = $this->sanitize($query);
        $request->replaceQuery($query); // Replace GET data with sanitized data
 
        return $request;
    }
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/ConvertEmptyStringsToNull.php
<?php
 
namespace Eyika\Atom\Framework\Http\Middlewares;
 
use Closure;
use Eyika\Atom\Framework\Http\BaseResponse;
use Eyika\Atom\Framework\Http\Request;
use Eyika\Atom\Framework\Http\Contracts\MiddlewareInterface;
 
class ConvertEmptyStringsToNull implements MiddlewareInterface
{
    /**
     * Handle an incoming request.
     *
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        $this->clean($request);
 
        return $next($request);
    }
 
    /**
     * Clean the request's data by converting empty strings to null.
     *
     * @param Request $request
     * @return void
     */
    protected function clean(Request $request)
    {
        $input = $request->input();
        $query = $request->query();
 
        $cleanedInput = $this->convertEmptyStringsToNull($input);
        $cleanedQuery = $this->convertEmptyStringsToNull($query);
 
        $request->replaceInput($cleanedInput);
        $request->replaceQuery($cleanedQuery);
    }
 
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/TrimStrings.php
namespace App\Http\Middlewares;
 
use Closure;
use Eyika\Atom\Framework\Http\BaseResponse;
use Eyika\Atom\Framework\Http\Request;
use Eyika\Atom\Framework\Http\Contracts\MiddlewareInterface;
 
class TrimStrings implements MiddlewareInterface
{
    /**
     * Handle an incoming request.
     *
     * @param Request $request
     * @return mixed
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        $this->clean($request);
 
        return $next($request);
    }
 
    /**
     * Clean the request's data by trimming whitespace.
     *
     * @param Request $request
     * @return void
     */
    protected function clean(Request $request)
    {
        $input = $request->input();
        $query = $request->query();
 
        $cleanedInput = $this->trimArray($input);
        $cleanedQuery = $this->trimArray($query);
 
        $request->replaceInput($cleanedInput);
        $request->replaceQuery($cleanedQuery);
    }
 
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Middlewares/ValidatePostSize.php
use Eyika\Atom\Framework\Http\BaseResponse;
use Eyika\Atom\Framework\Http\Request;
use Eyika\Atom\Framework\Http\Contracts\MiddlewareInterface;
use Eyika\Atom\Framework\Http\Response;
use Eyika\Atom\Framework\Support\Facade\Response as FacadeResponse;
 
class ValidatePostSize implements MiddlewareInterface
{
    /**
     * Handle an incoming request.
     *
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        // Check if the content length exceeds the post_max_size
        if ($this->isRequestTooLarge($request)) {
            return $this->handleRequestTooLarge($request);
        }
 
        return $next($request);
    }
 
    /**
     * Determine if the request size exceeds the post_max_size.
     *
     * @param Request $request
     * @return bool
     */
    protected function isRequestTooLarge(Request $request)
    {
        $postMaxSize = $this->getPostMaxSize();
        $contentLength = $request->server('CONTENT_LENGTH', 0);
 
        return $postMaxSize > 0 && $contentLength > $postMaxSize;
    }
 
    /**
     * Handle a request that is too large.
     *
     * @param Request $request
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/PreventRequestsDuringMaintenance.php
    public function __construct(array $except = [])
    {
        $this->except = $except;
    }
 
    /**
     * Handle an incoming request.
     *
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        // Check if the application is in maintenance mode
        if ($this->isDownForMaintenance()) {
            // If the request is not in the excepted URIs, block it
            if (!$this->inExceptArray($request)) {
                return $this->makeMaintenanceResponse();
            }
        }
 
        return $next($request);
    }
 
    /**
     * Determine if the application is in maintenance mode.
     *
     * @return bool
     */
    protected function isDownForMaintenance()
    {
        // In Laravel, this would typically check for a file like 'storage/framework/down'
        return file_exists(__DIR__ . '/storage/framework/maintainance.php');
    }
 
    /**
     * Determine if the request has a URI that should pass through maintenance mode.
     *
     * @param Request $request
     * @return bool
     */
    protected function inExceptArray(Request $request)
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/app/Http/Middlewares/TrustProxies.php
 
        // Default to X-Forwarded-For header
        $this->headers = $headers ?? (Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | 
                                       Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO);
    }
 
    /**
     * Handle an incoming request.
     *
     * @return mixed
     */
    public function handle(Request $request, Closure $next): BaseResponse
    {
        // Trust the proxies configured for this application
        $request->setTrustedProxies(
            $this->proxies ?? ['127.0.0.1', 'localhost'], // Default to localhost if no proxies set
            1
        );
 
        return $next($request);
    }
 
    /**
     * Set the trusted proxies for this application.
     *
     * @param  array|string|null  $proxies
     * @return $this
     */
    public function setProxies($proxies)
    {
        $this->proxies = $proxies;
 
        return $this;
    }
 
    /**
     * Set the headers that should be used to detect proxies.
     *
     * @param  int  $headers
     * @return $this
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
                }
 
                // Call the middleware's handle method or invoke it
                $resp = method_exists($pipe, 'handle')
                    ? $pipe->handle($passable, $next, ...$parameters)
                    : $pipe($passable, $next);
 
                if (!$resp instanceof BaseResponse && !is_string($resp)) {
                    $pipename = getCallableName($pipe);
                    throw new BaseException("$pipename must return a BaseResponse object or string");
                }
                return $resp;
            };
        };
    }
 
    /**
     * Resolve middleware from a string definition.
     */
    protected function resolveMiddleware(string|array $pipe)
    {
        // Split the pipe string to extract class and parameters
        $parts = is_array($pipe) ? $pipe : explode(':', $pipe, 2);
        $pipeClass = $parts[0];
        $parameters = isset($parts[1]) ? explode(',', $parts[1]) : [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Pipeline.php
        return $this;
    }
 
    /**
     * Run the pipeline with the given passable object.
     * 
     * @return BaseResponse|string|bool
     */
    public function run($passable)
    {
        $this->passable = $passable;
 
        // Reduce the pipes to a single callable pipeline
        $pipeline = array_reduce(
            array_reverse($this->pipes),
            $this->carry(),
            $this->coreHandler
        );
 
        $resp = $pipeline($this->passable);
 
        return $resp;
    }
 
    /**
     * Get the callable that wraps middleware around the next handler.
     * Create the closure chain for the pipeline.
     *
     * @return callable
     */
    protected function carry(): callable
    {
        return function (Closure $next, string|array|callable $pipe): callable {
            return function (Request $passable) use ($next, $pipe) {
                if (is_string($pipe) || is_array($pipe)) {
                    // Resolve middleware class and parameters
                    [$pipeClass, $parameters] = $this->resolveMiddleware($pipe);
                    $pipe = is_callable($pipeClass) ? $pipeClass : new $pipeClass;
                } else {
                    $parameters = [];
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Route.php
        $middlewares = array_merge(
            static::$defaultMiddlewares,
            static::findRouteMiddlewares($requestMethod, $requestUri)
        );
    
        // Core handler for the pipeline
        $coreHandler = function ($request) use ($routeMatched, $requestMethod, $requestUri) {
            // If no route matches, set up a 404 handler
            if (!$routeMatched) {
                return self::handleNotFound($request)->send();
            }
            $callback = self::$routes[$requestMethod][self::$currentRoute]['callback'];
            return self::executeCallback($callback, $request, $request->route_params ?? []);
        };
    
        // Run the pipeline
        $response = (new Pipeline())
            ->through($middlewares)
            ->then($coreHandler)
            ->run($request);
    
        // Output the response
        if (!$response instanceof BaseResponse)
            $response = Response::plain(is_null($response) ? '' : (string)$response);
 
        return $response->send();
        // elseif (is_string($response)) {
        //     echo $response;
        //     return true;
        // } else return true;
    }
 
    public static function route($name, $parameters = [])
    {
        foreach (self::$routes as $method => $routes) {
            foreach ($routes as $route => $data) {
                if ($data['name'] === $name) {
                    foreach ($parameters as $key => $value) {
                        $route = str_replace('$' . $key, $value, $route);
                    }
/home/u694026900/domains/backtestfx.com/public_html/api_dev/vendor/eyika/atom-framework/src/Http/Server.php
    public static function handle(): bool
    {
        try {
            static::$app->registerProviders();
            // ErrorHandler::register();
            $request = static::$app->make('request');
            static::$app->instance('request', $request);
            if (preg_match('/^.*$/i', $request->requestUri())) {
                //register controllers
                if (!str_contains($request->pathInfo(), '/api') && !$request->wantsJson() && !$request->isXmlHttpRequest() && !$request->isOptions()) {
                    static::loadMiddlewares('web');
                    ///TODO: load all default web middlewares
                    require_once base_path().'/routes/web.php';
                } else {
                    Route::isApiRequest(true);
                    static::loadMiddlewares('api');
                    ///TODO: load all default api middlewares
                    require_once base_path().'/routes/api.php';
                }
                $status = Route::dispatch($request);
                if (!$request->isAssetRequest())
                    Route::storeCurrent();
 
                return $status;
            } else {
                return false; // Let php bultin server serve
            }
        } catch (Throwable $e) {
            /** @var ExceptionHandler $handler */
            $handler = static::$app->make(ExceptionHandler::class);
 
            return $handler->render($request, $e)->send();
        }
    }
 
    private static function loadMiddlewares(string $type)
    {
        /** @var Kernel $kernel */
        $kernel = static::$app->make(Kernel::class);
 
/home/u694026900/domains/backtestfx.com/public_html/api_dev/public/index.php
|
*/
require_once __DIR__."/../vendor/eyika/atom-framework/src/helpers.php";
 
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request using
| the application's HTTP kernel. Then, we will send the response back
| to this client's browser, allowing them to enjoy our application.
|
*/
 
try {
    $app = require_once __DIR__.'/../bootstrap/app.php';
 
    $server = new Server($app);
    $server->handle();
} catch (\Exception $e) {
    echo $e->getMessage();
}
 

Environment & details:

empty
empty
empty
Key Value
PHPSESSID 5d6b5b6748d92e0ea244206e131bca83
empty
Key Value
LSPHP_ProcessGroup on
PATH /usr/local/bin:/bin:/usr/bin
HTTP_ACCEPT */*
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_COOKIE PHPSESSID=5d6b5b6748d92e0ea244206e131bca83
HTTP_HOST apidev.backtestfx.com
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
DOCUMENT_ROOT /home/u694026900/domains/backtestfx.com/public_html/api_dev
REMOTE_ADDR 216.73.216.104
REMOTE_PORT 59607
SERVER_ADDR 145.223.37.57
SERVER_NAME apidev.backtestfx.com
SERVER_ADMIN
SERVER_PORT 443
REQUEST_SCHEME https
REQUEST_URI /sitemap.xml
REDIRECT_URL /public/sitemap.xml
REDIRECT_REQUEST_METHOD GET
HTTPS on
CRAWLER_USLEEP 1000
CRAWLER_LOAD_LIMIT_ENFORCE 25
H_PLATFORM Hostinger
H_TYPE business
H_CANARY false
H_STAGING false
REDIRECT_STATUS 200
UNIQUE_ID Ok41K7hhqGt1lxh9iqBy-MEx
X_SPDY HTTP2
SSL_PROTOCOL TLSv1.3
SSL_CIPHER TLS_AES_256_GCM_SHA384
SSL_CIPHER_USEKEYSIZE 256
SSL_CIPHER_ALGKEYSIZE 256
SCRIPT_FILENAME /home/u694026900/domains/backtestfx.com/public_html/api_dev/public/index.php
QUERY_STRING
SCRIPT_URI https://apidev.backtestfx.com/sitemap.xml
SCRIPT_URL /sitemap.xml
SCRIPT_NAME /public/index.php
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE LiteSpeed
REQUEST_METHOD GET
X-LSCACHE on,crawler,esi,combine
PHP_SELF /public/index.php
REQUEST_TIME_FLOAT 1772195509.3331
REQUEST_TIME 1772195509
APP_NAME fx-data-server
WEB_APP_NAME FxTester
APP_ENV dev
APP_KEY base64:bnAxN0JYME5LOXNiZmlmZ2xpRTVpOHdWdUlQQWxuRFE=
APP_DEBUG true
APP_URL apidev.backtestfx.com
FILESYSTEM_DISK public
LOG_CHANNEL stack
LOG_LEVEL debug
DB_ADAPTER mysql
DB_CONNECTION mysql
DB_HOST 127.0.0.1
DB_PORT 3306
DB_DATABASE u694026900_backtestfxdev
DB_USERNAME u694026900_devdbuser
DB_PASSWORD 6;>I#C>sT=
CACHE_DRIVER file
QUEUE_CONNECTION sync
SESSION_DRIVER file
SESSION_LIFETIME 120
REDIS_HOST 127.0.0.1
REDIS_PASSWORD null
REDIS_PORT 6379
MAIL_DRIVER log
EMAIL_HOST smtp.titan.email
EMAIL_PORT 465
SUPPORT_EMAIL_PASSWORD **^hkmC7~ge"5>i
SUPPORT_EMAIL_USER chitchat@dev.backtestfx.com
SUPPORT_EMAIL_NAME BacktestFX Support
NOREPLY_EMAIL_PASSWORD \"]n^M+nKiC+/f_3
NOREPLY_EMAIL_USER noreply@dev.backtestfx.com
NOREPLY_EMAIL_NAME BacktestFX Noreply
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION us-east-1
AWS_BUCKET
MEDIA_DISK public
COOKIE_CONSENT_ENABLED true
LOGVIEWER_PATTERN *.log
ADMIN_APP_URI https://dev.backtestfx.com
USER_APP_URI https://dev.backtestfx.com
SERVER_APP_URI http://backtestfx.test:5533
JWT_KEY example_key
JWT_ISS https://dev.backtestfx.com
JWT_AUD https://dev.backtestfx.com
TEST_USER_NAME admin
TEST_USER admin@fxtester.com.ng
TEST_PASS 123456789
FINGERPRINT_MAX_AGE 15
SECRET_TOKEN sklfehfuehfuwh783r723f2feuenen
SHA_TYPE sha256
EMAIL2FA_MAX_AGE 900
CONTENT_LENGTH_MIN 8
CHRON_INTERVAL 60
OAUTH_CALLBACK /auth/login
FB_APP_ID 628966102602835
FB_APP_SECRET d5de672b325e0b4fc94493cd0000f27a
GOOGLE_APP_ID
GOOGLE_APP_SECRET
TWITTER_APP_ID
TWITTER_APP_SECRET
PAYMENT_PROVIDER_BASE_URL https://api.flutterwave.com/v3/
PAYMENT_PROVIDER_PUBLIC_KEY FLWPUBK_TEST-dd2a4afa30c6bfa55bca23ee8210ea8a-X
PAYMENT_PROVIDER_SECRET_KEY FLWSECK_TEST-8b8ef0137889049bd869bf78459c3802-X
PAYMENT_PROVIDER_ENCRYPTION_KEY FLWSECK_TESTb38ac5bdab71
PAYMENT_PROVIDER_ENV staging
PAYMENT_PROVIDER flutterwave
IPLOC_API_KEY 78CE389F5BC314977F3C6A97E5C38B32
DOLLAR_PER_POINTS 0.01
POINTS_PER_REFERRAL 1
MAX_ACTIVE_LOGIN_PER_USER 3
BTFX_DEVOPS_TOKEN 6c40b1b0b78865d692400b8aa6837fdb
FX_FILES_ARE_COMPRESSED true
CORS_ALLOWED_ORIGINS https://dev.backtestfx.com,https://basttyy.github.io
DUKAS_JSON_DATAFEED_BASE_URL https://jetta.dukascopy.com
Key Value
APP_NAME fx-data-server
WEB_APP_NAME FxTester
APP_ENV dev
APP_KEY base64:bnAxN0JYME5LOXNiZmlmZ2xpRTVpOHdWdUlQQWxuRFE=
APP_DEBUG true
APP_URL apidev.backtestfx.com
FILESYSTEM_DISK public
LOG_CHANNEL stack
LOG_LEVEL debug
DB_ADAPTER mysql
DB_CONNECTION mysql
DB_HOST 127.0.0.1
DB_PORT 3306
DB_DATABASE u694026900_backtestfxdev
DB_USERNAME u694026900_devdbuser
DB_PASSWORD 6;>I#C>sT=
CACHE_DRIVER file
QUEUE_CONNECTION sync
SESSION_DRIVER file
SESSION_LIFETIME 120
REDIS_HOST 127.0.0.1
REDIS_PASSWORD null
REDIS_PORT 6379
MAIL_DRIVER log
EMAIL_HOST smtp.titan.email
EMAIL_PORT 465
SUPPORT_EMAIL_PASSWORD **^hkmC7~ge"5>i
SUPPORT_EMAIL_USER chitchat@dev.backtestfx.com
SUPPORT_EMAIL_NAME BacktestFX Support
NOREPLY_EMAIL_PASSWORD \"]n^M+nKiC+/f_3
NOREPLY_EMAIL_USER noreply@dev.backtestfx.com
NOREPLY_EMAIL_NAME BacktestFX Noreply
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION us-east-1
AWS_BUCKET
MEDIA_DISK public
COOKIE_CONSENT_ENABLED true
LOGVIEWER_PATTERN *.log
ADMIN_APP_URI https://dev.backtestfx.com
USER_APP_URI https://dev.backtestfx.com
SERVER_APP_URI http://backtestfx.test:5533
JWT_KEY example_key
JWT_ISS https://dev.backtestfx.com
JWT_AUD https://dev.backtestfx.com
TEST_USER_NAME admin
TEST_USER admin@fxtester.com.ng
TEST_PASS 123456789
FINGERPRINT_MAX_AGE 15
SECRET_TOKEN sklfehfuehfuwh783r723f2feuenen
SHA_TYPE sha256
EMAIL2FA_MAX_AGE 900
CONTENT_LENGTH_MIN 8
CHRON_INTERVAL 60
OAUTH_CALLBACK /auth/login
FB_APP_ID 628966102602835
FB_APP_SECRET d5de672b325e0b4fc94493cd0000f27a
GOOGLE_APP_ID
GOOGLE_APP_SECRET
TWITTER_APP_ID
TWITTER_APP_SECRET
PAYMENT_PROVIDER_BASE_URL https://api.flutterwave.com/v3/
PAYMENT_PROVIDER_PUBLIC_KEY FLWPUBK_TEST-dd2a4afa30c6bfa55bca23ee8210ea8a-X
PAYMENT_PROVIDER_SECRET_KEY FLWSECK_TEST-8b8ef0137889049bd869bf78459c3802-X
PAYMENT_PROVIDER_ENCRYPTION_KEY FLWSECK_TESTb38ac5bdab71
PAYMENT_PROVIDER_ENV staging
PAYMENT_PROVIDER flutterwave
IPLOC_API_KEY 78CE389F5BC314977F3C6A97E5C38B32
DOLLAR_PER_POINTS 0.01
POINTS_PER_REFERRAL 1
MAX_ACTIVE_LOGIN_PER_USER 3
BTFX_DEVOPS_TOKEN 6c40b1b0b78865d692400b8aa6837fdb
FX_FILES_ARE_COMPRESSED true
CORS_ALLOWED_ORIGINS https://dev.backtestfx.com,https://basttyy.github.io
DUKAS_JSON_DATAFEED_BASE_URL https://jetta.dukascopy.com
0. Whoops\Handler\PrettyPageHandler