* * @throws \Illuminate\Database\Eloquent\ModelNotFoundException */ public function firstOrFail($columns = array('*')) { if ( ! is_null($model = $this->first($columns))) return $model; throw (new ModelNotFoundException)->setModel(get_class($this->model)); }
} public function show($url) { $page = Service::query() ->sUrl($url) ->sVisible() ->firstOrFail(); View::share ( 'footer', ['title' => 'Получить <span class="main-color">Предложение</span>', 'subject' => $page->title, 'text' => 'Мы подготовим для вас предложение по данной<br> услуге, для этого отправьте нам свои контакты.']);
* @param array $parameters * @return \Symfony\Component\HttpFoundation\Response */ public function callAction($method, $parameters) { $this->setupLayout(); $response = call_user_func_array(array($this, $method), $parameters); // If no response is returned from the controller action and a layout is being
* @param string $method * @return mixed */ protected function call($instance, $route, $method) { $parameters = $route->parametersWithoutNulls(); return $instance->callAction($method, $parameters); }
$response = $this->before($instance, $route, $request, $method); // If no before filters returned a response we'll call the method on the controller // to get the response to be returned to the router. We will then return it back // out for processing by this router and the after filters can be called then. if (is_null($response)) { $response = $this->call($instance, $route, $method); }
$request = $this->getCurrentRequest(); // Now we can split the controller and method out of the action string so that we // can call them appropriately on the class. This controller and method are in // in the Class@method format and we need to explode them out then use them. list($class, $method) = explode('@', $controller); return $d->dispatch($route, $request, $class, $method); }; }
* * @return mixed */ public function run() { $parameters = array_filter($this->parameters(), function($p) { return isset($p); }); return call_user_func_array($this->action['uses'], $parameters); }
// Once we have successfully matched the incoming request to a given route we // can call the before filters on that route. This works similar to global // filters in that if a response is returned we will not call the route. $response = $this->callRouteBefore($route, $request); if (is_null($response)) { $response = $route->run($request); }
// If no response was returned from the before filter, we will call the proper // route instance to get the response. If no route is found a response will // still get returned based on why no routes were found for this request. $response = $this->callFilter('before', $request); if (is_null($response)) { $response = $this->dispatchToRoute($request); }
} if ($this->runningUnitTests() && ! $this['session']->isStarted()) { $this['session']->start(); } return $this['router']->dispatch($this->prepareRequest($request)); }
{ try { $this->refreshRequest($request = Request::createFromBase($request)); $this->boot(); return $this->dispatch($request); } catch (\Exception $e)
if ($this->sessionConfigured()) { $session = $this->startSession($request); $request->setSession($session); } $response = $this->app->handle($request, $type, $catch); // Again, if the session has been configured we will need to close out the session
* @param \Symfony\Component\HttpFoundation\Request $request * @param int $type * @param bool $catch * @return \Symfony\Component\HttpFoundation\Response */ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) { $response = $this->app->handle($request, $type, $catch); foreach ($this->cookies->getQueuedCookies() as $cookie)
* @param \Symfony\Component\HttpFoundation\Request $request * @param int $type * @param bool $catch * @return \Symfony\Component\HttpFoundation\Response */ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) { return $this->encrypt($this->app->handle($this->decrypt($request), $type, $catch)); }
{ $this->app = $app; $this->middlewares = $middlewares; } public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) { return $this->app->handle($request, $type, $catch); }
* @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function run(SymfonyRequest $request = null) { $request = $request ?: $this['request']; $response = with($stack = $this->getStackedClient())->handle($request); $response->send();
| 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 application we have whipped up for them. | */ $app->run();
Key | Value |
PATH | /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin |
TZ | Europe/Moscow |
SCRIPT_NAME | /index.php |
REQUEST_URI | /services/%25D0%25A1%25D0%25BE%25D0%25B7%25D0%25B4%25D0%25B0%25D0%25BD%25D0%25B8%25D0%25B5%2520%25D1%258D%25D0%25BA%25D1%2581%25D0%25BF%25D1%2580%25D0%25B5%25D1%2581%25D1%2581%2520%25D1%2581%25D0%25B0%25D0%25B9%25D1%2582%25D0%25BE%25D0%25B2 |
QUERY_STRING | |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.0 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_URL | /services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
REMOTE_PORT | 37766 |
SCRIPT_FILENAME | /var/www/grammat6/public_html/cbgram/public/index.php |
SERVER_ADMIN | webmaster@cbgram.grammaticastudioru.grammat6.cp.regruhosting.ru |
CONTEXT_DOCUMENT_ROOT | /var/www/grammat6/public_html/cbgram/public |
CONTEXT_PREFIX | |
DOCUMENT_ROOT | /var/www/grammat6/public_html/cbgram/public |
REMOTE_ADDR | 3.236.139.73 |
SERVER_PORT | 443 |
SERVER_ADDR | 31.31.198.198 |
SERVER_NAME | cbgram.ru |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_CONNECTION | close |
HTTP_X_FORWARDED_HTTPS | on |
HTTP_X_FORWARDED_FOR | 3.236.139.73 |
HTTP_X_HTTPS | On |
HTTP_HOST | cbgram.ru |
SCRIPT_URI | https://cbgram.ru/services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
SCRIPT_URL | /services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
REQUEST_SCHEME | https |
HTTPS | on |
UNIQUE_ID | ZgYo7GvHz97IAAZt1MltEwAAAIo |
REDIRECT_STATUS | 200 |
REDIRECT_SCRIPT_URI | https://cbgram.ru/services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
REDIRECT_SCRIPT_URL | /services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
REDIRECT_REQUEST_SCHEME | https |
REDIRECT_HTTPS | on |
REDIRECT_UNIQUE_ID | ZgYo7GvHz97IAAZt1MltEwAAAIo |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711679724.2667 |
REQUEST_TIME | 1711679724 |
argv | Array ( ) |
argc | 0 |
Key | Value |
PATH | /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin |
TZ | Europe/Moscow |
SCRIPT_NAME | /index.php |
REQUEST_URI | /services/%25D0%25A1%25D0%25BE%25D0%25B7%25D0%25B4%25D0%25B0%25D0%25BD%25D0%25B8%25D0%25B5%2520%25D1%258D%25D0%25BA%25D1%2581%25D0%25BF%25D1%2580%25D0%25B5%25D1%2581%25D1%2581%2520%25D1%2581%25D0%25B0%25D0%25B9%25D1%2582%25D0%25BE%25D0%25B2 |
QUERY_STRING | |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.0 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_URL | /services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
REMOTE_PORT | 37766 |
SCRIPT_FILENAME | /var/www/grammat6/public_html/cbgram/public/index.php |
SERVER_ADMIN | webmaster@cbgram.grammaticastudioru.grammat6.cp.regruhosting.ru |
CONTEXT_DOCUMENT_ROOT | /var/www/grammat6/public_html/cbgram/public |
CONTEXT_PREFIX | |
DOCUMENT_ROOT | /var/www/grammat6/public_html/cbgram/public |
REMOTE_ADDR | 3.236.139.73 |
SERVER_PORT | 443 |
SERVER_ADDR | 31.31.198.198 |
SERVER_NAME | cbgram.ru |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_CONNECTION | close |
HTTP_X_FORWARDED_HTTPS | on |
HTTP_X_FORWARDED_FOR | 3.236.139.73 |
HTTP_X_HTTPS | On |
HTTP_HOST | cbgram.ru |
SCRIPT_URI | https://cbgram.ru/services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
SCRIPT_URL | /services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
REQUEST_SCHEME | https |
HTTPS | on |
UNIQUE_ID | ZgYo7GvHz97IAAZt1MltEwAAAIo |
REDIRECT_STATUS | 200 |
REDIRECT_SCRIPT_URI | https://cbgram.ru/services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
REDIRECT_SCRIPT_URL | /services/%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%8D%D0%BA%D1%81%D0%BF%D1%80%D0%B5%D1%81%D1%81%20%D1%81%D0%B0%D0%B9%D1%82%D0%BE%D0%B2 |
REDIRECT_REQUEST_SCHEME | https |
REDIRECT_HTTPS | on |
REDIRECT_UNIQUE_ID | ZgYo7GvHz97IAAZt1MltEwAAAIo |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711679724.2667 |
REQUEST_TIME | 1711679724 |
argv | Array ( ) |
argc | 0 |