* @param array $headers * @return void */ public function abort($code, $message = '', array $headers = array()) { if ($code == 404) { throw new NotFoundHttpException($message); } else
switch (count($args)) { case 0: return $instance->$method(); case 1: return $instance->$method($args[0]); case 2:
*/ public function show($slug) { // Check if the page exists if (is_null($page = Page::where('slug', $slug)->first())) { // Put a 404 in ur face, yo ! return App::abort(404); }
*/ public function show($slug) { // Check if the page exists if (is_null($page = Page::where('slug', $slug)->first())) { // Put a 404 in ur face, yo ! return App::abort(404); }
* * @param string $method * @param array $parameters * @return mixed */ protected function callMethod($method, $parameters) { return call_user_func_array(array($this, $method), $parameters); }
// after filters on the controller to wrap up any last minute processing. $response = $this->callBeforeFilters($router, $method); $this->setupLayout(); if (is_null($response)) { $response = $this->callMethod($method, $parameters); }
// We will extract the passed in parameters off of the route object so we will // pass them off to the controller method as arguments. We will not get the // defaults so that the controllers will be able to use its own defaults. $args = array_values($route->getParametersWithoutDefaults()); $instance = $ioc->make($controller); return $instance->callAction($ioc, $me, $method, $args); }; }
* * @return mixed */ protected function callCallable() { $variables = array_values($this->getParametersWithoutDefaults()); return call_user_func_array($this->getOption('_call'), $variables); }
// We will only call the router callable if no "before" middlewares returned // a response. If they do, we will consider that the response to requests // so that the request "lifecycle" will be easily halted for filtering. $response = $this->callBeforeFilters($request); if ( ! isset($response)) { $response = $this->callCallable(); }
// 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 | jorgedartb |
FCGI_ROLE | RESPONDER |
REDIRECT_STATUS | 200 |
UNIQUE_ID | ZgYAw31dS4940MVJBJSOXAAAADs |
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 | /es/events |
SCRIPT_URI | http://jorgedarocha.com/es/events |
CFG_CLUSTER | cluster007 |
ENVIRONMENT | production |
PHP_VER | 5_3 |
REGISTER_GLOBALS | 0 |
HTTP_HOST | jorgedarocha.com |
HTTP_X_PREDICTOR | 1 |
HTTP_X_FORWARDED_FOR | 3.237.91.98 |
HTTP_X_FORWARDED_PROTO | http |
HTTP_X_OVHREQUEST_ID | 33f3c10ec70753b47bc0990e41e5ca3c |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_REFERER | http://jorgedarocha.com/events |
HTTP_X_FORWARDED_PORT | 80 |
HTTP_X_REMOTE_PORT | 35996 |
HTTP_X_REMOTE_IP | 3.237.91.98 |
HTTP_X_REMOTE_PROTO | http |
HTTP_FORWARDED | for=3.237.91.98; proto=http; host=jorgedarocha.com |
HTTP_REMOTE_PORT | 35996 |
HTTP_X_IPLB_UNIQUE_ID | 03ED5B62:8C9C_5762E712:0050_660600C3_55A7A:22C1 |
HTTP_REMOTE_IP | 3.237.91.98 |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache |
SERVER_NAME | jorgedarocha.com |
SERVER_ADDR | 10.7.20.75 |
SERVER_PORT | 80 |
REMOTE_ADDR | 3.237.91.98 |
DOCUMENT_ROOT | /home/jorgedartb/www |
SERVER_ADMIN | postmaster@jorgedarocha.com |
SCRIPT_FILENAME | /home/jorgedartb/www/public/index.php |
REMOTE_PORT | 55988 |
REDIRECT_URL | /public/es/events |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /es/events |
SCRIPT_NAME | /public/index.php |
PHP_SELF | /public/index.php |
REQUEST_TIME_FLOAT | 1711669443.9912 |
REQUEST_TIME | 1711669443 |
argv | Array ( ) |
argc | 0 |
Key | Value |
_sf2_attributes | Array ( [_token] => K57hpayQfstdXrJhgxFL8B7EJrjGF3sNJ80Kw2Ew [language] => es [locale] => es ) |
_sf2_flashes | Array ( ) |
_sf2_meta | Array ( [u] => 1711669444 [c] => 1711669444 [l] => 7200 ) |
Key | Value |
USER | jorgedartb |
FCGI_ROLE | RESPONDER |
REDIRECT_STATUS | 200 |
UNIQUE_ID | ZgYAw31dS4940MVJBJSOXAAAADs |
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 | /es/events |
SCRIPT_URI | http://jorgedarocha.com/es/events |
CFG_CLUSTER | cluster007 |
ENVIRONMENT | production |
PHP_VER | 5_3 |
REGISTER_GLOBALS | 0 |
HTTP_HOST | jorgedarocha.com |
HTTP_X_PREDICTOR | 1 |
HTTP_X_FORWARDED_FOR | 3.237.91.98 |
HTTP_X_FORWARDED_PROTO | http |
HTTP_X_OVHREQUEST_ID | 33f3c10ec70753b47bc0990e41e5ca3c |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_REFERER | http://jorgedarocha.com/events |
HTTP_X_FORWARDED_PORT | 80 |
HTTP_X_REMOTE_PORT | 35996 |
HTTP_X_REMOTE_IP | 3.237.91.98 |
HTTP_X_REMOTE_PROTO | http |
HTTP_FORWARDED | for=3.237.91.98; proto=http; host=jorgedarocha.com |
HTTP_REMOTE_PORT | 35996 |
HTTP_X_IPLB_UNIQUE_ID | 03ED5B62:8C9C_5762E712:0050_660600C3_55A7A:22C1 |
HTTP_REMOTE_IP | 3.237.91.98 |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache |
SERVER_NAME | jorgedarocha.com |
SERVER_ADDR | 10.7.20.75 |
SERVER_PORT | 80 |
REMOTE_ADDR | 3.237.91.98 |
DOCUMENT_ROOT | /home/jorgedartb/www |
SERVER_ADMIN | postmaster@jorgedarocha.com |
SCRIPT_FILENAME | /home/jorgedartb/www/public/index.php |
REMOTE_PORT | 55988 |
REDIRECT_URL | /public/es/events |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /es/events |
SCRIPT_NAME | /public/index.php |
PHP_SELF | /public/index.php |
REQUEST_TIME_FLOAT | 1711669443.9912 |
REQUEST_TIME | 1711669443 |
argv | Array ( ) |
argc | 0 |