* @param Exception $e * @return void */ protected function handleRoutingException(\Exception $e) { if ($e instanceof ResourceNotFoundException) { throw new NotFoundHttpException($e->getMessage()); }
} // The Symfony routing component's exceptions implement this interface we // can type-hint it to make sure we're only providing special handling // for those exceptions, and not other random exceptions that occur. catch (ExceptionInterface $e) { $this->handleRoutingException($e); }
} // Once we have the route, we can just run it to get the responses, which will // always be instances of the Response class. Once we have the responses we // will execute the global "after" middlewares to finish off the request. else { $this->currentRoute = $route = $this->findRoute($request); $response = $route->run($request);
if ($this->isDownForMaintenance()) { $response = $this['events']->until('illuminate.app.down'); if ( ! is_null($response)) return $this->prepareResponse($response, $request); } return $this['router']->dispatch($this->prepareRequest($request)); }
/** * Handles the given request and delivers the response. * * @return void */ public function run() { $response = $this->dispatch($this['request']); $this['router']->callCloseFilter($this['request'], $response);
| Once we have the application, we can simply call the run method, | which will execute the request and send the response back to | the client's browser allowing them to enjoy the creative | and wonderful applications we have created for them. | */ $app->run(); /*
Key | Value |
USER | salahelmbf |
FCGI_ROLE | RESPONDER |
REDIRECT_STATUS | 200 |
UNIQUE_ID | Zgaj94Nru@BFgQ25Y51gewAAAEQ |
GEOIP_COUNTRY_CODE | US |
GEOIP_COUNTRY_NAME | United States |
GEOIP_REGION | VA |
GEOIP_CITY | Ashburn |
GEOIP_DMA_CODE | 511 |
GEOIP_AREA_CODE | 703 |
GEOIP_LATITUDE | 39.046902 |
GEOIP_LONGITUDE | -77.490303 |
SCRIPT_URL | /uploads/lyrics/M071.pdf |
SCRIPT_URI | http://salahelmahdi.com/uploads/lyrics/M071.pdf |
CFG_CLUSTER | cluster005 |
ENVIRONMENT | production |
HTTP_HOST | salahelmahdi.com |
HTTP_X_PREDICTOR | 1 |
HTTP_X_FORWARDED_FOR | 54.204.117.206 |
HTTP_X_FORWARDED_PROTO | http |
HTTP_X_OVHREQUEST_ID | 751af17f8cd6ea6c7c8eb84c74f5e30a |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_X_FORWARDED_PORT | 80 |
HTTP_X_REMOTE_PORT | 43992 |
HTTP_X_REMOTE_IP | 54.204.117.206 |
HTTP_X_REMOTE_PROTO | http |
HTTP_FORWARDED | for=54.204.117.206; proto=http; host=salahelmahdi.com |
HTTP_REMOTE_PORT | 43992 |
HTTP_X_IPLB_UNIQUE_ID | 36CC75CE:ABD8_D5BA2110:0050_6606A3F7_ACA5:3424 |
HTTP_REMOTE_IP | 54.204.117.206 |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache |
SERVER_NAME | salahelmahdi.com |
SERVER_ADDR | 10.5.20.24 |
SERVER_PORT | 80 |
REMOTE_ADDR | 54.204.117.206 |
DOCUMENT_ROOT | /home/salahelmbf/www/public |
SERVER_ADMIN | postmaster@salahelmahdi.com |
SCRIPT_FILENAME | /home/salahelmbf/www/public/index.php |
REMOTE_PORT | 12410 |
REDIRECT_URL | /uploads/lyrics/M071.pdf |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /uploads/lyrics/M071.pdf |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711223.4982 |
REQUEST_TIME | 1711711223 |
argv | Array ( ) |
argc | 0 |
Key | Value |
_sf2_attributes | Array ( [_token] => O0NMJua6xt6A9cqCswVoKR4kaKOvPPsF3qa3kT7v ) |
_sf2_flashes | Array ( ) |
_sf2_meta | Array ( [u] => 1711711223 [c] => 1711711223 [l] => 7200 ) |
Key | Value |
USER | salahelmbf |
FCGI_ROLE | RESPONDER |
REDIRECT_STATUS | 200 |
UNIQUE_ID | Zgaj94Nru@BFgQ25Y51gewAAAEQ |
GEOIP_COUNTRY_CODE | US |
GEOIP_COUNTRY_NAME | United States |
GEOIP_REGION | VA |
GEOIP_CITY | Ashburn |
GEOIP_DMA_CODE | 511 |
GEOIP_AREA_CODE | 703 |
GEOIP_LATITUDE | 39.046902 |
GEOIP_LONGITUDE | -77.490303 |
SCRIPT_URL | /uploads/lyrics/M071.pdf |
SCRIPT_URI | http://salahelmahdi.com/uploads/lyrics/M071.pdf |
CFG_CLUSTER | cluster005 |
ENVIRONMENT | production |
HTTP_HOST | salahelmahdi.com |
HTTP_X_PREDICTOR | 1 |
HTTP_X_FORWARDED_FOR | 54.204.117.206 |
HTTP_X_FORWARDED_PROTO | http |
HTTP_X_OVHREQUEST_ID | 751af17f8cd6ea6c7c8eb84c74f5e30a |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_X_FORWARDED_PORT | 80 |
HTTP_X_REMOTE_PORT | 43992 |
HTTP_X_REMOTE_IP | 54.204.117.206 |
HTTP_X_REMOTE_PROTO | http |
HTTP_FORWARDED | for=54.204.117.206; proto=http; host=salahelmahdi.com |
HTTP_REMOTE_PORT | 43992 |
HTTP_X_IPLB_UNIQUE_ID | 36CC75CE:ABD8_D5BA2110:0050_6606A3F7_ACA5:3424 |
HTTP_REMOTE_IP | 54.204.117.206 |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache |
SERVER_NAME | salahelmahdi.com |
SERVER_ADDR | 10.5.20.24 |
SERVER_PORT | 80 |
REMOTE_ADDR | 54.204.117.206 |
DOCUMENT_ROOT | /home/salahelmbf/www/public |
SERVER_ADMIN | postmaster@salahelmahdi.com |
SCRIPT_FILENAME | /home/salahelmbf/www/public/index.php |
REMOTE_PORT | 12410 |
REDIRECT_URL | /uploads/lyrics/M071.pdf |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /uploads/lyrics/M071.pdf |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711223.4982 |
REQUEST_TIME | 1711711223 |
argv | Array ( ) |
argc | 0 |