{"id":296406,"date":"2019-12-26T03:00:10","date_gmt":"2019-12-26T03:00:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=296406"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=296406","title":{"rendered":"Laravel. \u041b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u043e\u0443\u0442\u0438\u043d\u0433"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/481726\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ri\/a5\/l4\/ria5l4vqjfp7yxunyvblqh4ybdy.png\" alt=\"\u041a\u0414\u041f\u0412\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  <\/p>\n<p>\u0425\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u043e\u043c \u0438 \u043a\u0430\u043a \u043c\u044b \u0435\u0451 \u0440\u0435\u0448\u0430\u043b\u0438.<\/p>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u0441\u0430\u043c\u044b\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u0430\u0439\u0442\u043e\u043c. \u0421\u0430\u0439\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0441\u044f, \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u043b\u0430\u0441\u044c \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u043d\u0430 \u0431\u0430\u0437\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Laravel \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e (\u043d\u0443\u0436\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u043b\u0441\u044f \u0438\u0437 \u0441\u0435\u0441\u0441\u0438\u0438, \u043b\u0438\u0431\u043e \u0431\u0440\u0430\u043b\u0441\u044f \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439). \u041c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b, \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u043b\u044e\u0447\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0444\u0440\u0430\u0437 \u0438 \u0432\u0437\u044f\u043b\u0438 \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0438\u0447\u0438.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"problema\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h2>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 SEO \u043f\u043e\u043d\u044f\u043b\u0430, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u0435\u0448\u0430\u0435\u0442 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0441\u0430\u0439\u0442\u0430. \u0422\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0438 \u0432 \u0423\u0420\u041b, \u043a\u0440\u043e\u043c\u0435 \u044f\u0437\u044b\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041d\u0430\u0448\u0438 \u0440\u043e\u0443\u0442\u044b \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434: <\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<thead>\n<tr>\n<th>\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430<\/th>\n<th>\u0420\u043e\u0443\u0442 ru (\u044f\u0437\u044b\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e)<\/th>\n<th>\u0420\u043e\u0443\u0442 en<\/th>\n<th>\u0420\u043e\u0443\u0442 fr<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u041e \u043d\u0430\u0441<\/td>\n<td><code>\/o-nas<\/code><\/td>\n<td><code>\/en\/about-us<\/code><\/td>\n<td><code>\/fr\/a-propos-de-nous<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u044b<\/td>\n<td><code>\/kontakty<\/code><\/td>\n<td><code>\/en\/contacts<\/code><\/td>\n<td><code>\/fr\/coordonnees<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u041d\u043e\u0432\u043e\u0441\u0442\u0438<\/td>\n<td><code>\/novosti<\/code><\/td>\n<td><code>\/en\/news<\/code><\/td>\n<td><code>\/fr\/les-nouvelles<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<p>\u0412\u0441\u0451 \u0432\u0441\u0442\u0430\u043b\u043e \u043d\u0430 \u0441\u0432\u043e\u0438 \u043c\u0435\u0441\u0442\u0430 \u0438 \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u043f\u0440\u0438\u043d\u044f\u043b\u0438\u0441\u044c \u0437\u0430 \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438.<br \/>  \u0427\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043e\u043c\u0435\u043d\u0430\u0445. \u0412 \u0446\u0435\u043b\u043e\u043c \u044d\u0442\u0438 \u0441\u0430\u0439\u0442\u044b \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u043d\u0443 \u0411\u0414, \u043d\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0434\u043e\u043c\u0435\u043d\u0430 \u043c\u043e\u0433\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<br \/>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u044b\u0435 (\u043f\u0440\u0438\u0447\u0435\u043c \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u0430 \u043d\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c\u0438), \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u044f\u0437\u044b\u043a.<\/p>\n<p>  <\/p>\n<p>\u0411\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u043e\u043c\u0435\u043d\u044b \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c (nginx \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0434\u043e\u043c\u0435\u043d\u044b \u043d\u0430 \u043e\u0434\u0438\u043d \u0430\u043f\u0441\u0442\u0440\u0438\u043c).<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0431\u043e\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0441\u0430\u0439\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u043e\u0432 \u0438 \u044f\u0437\u044b\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435, \u0447\u0442\u043e \u043d\u0430 \u043a\u043e\u0440\u043d\u044e \u0437\u0430\u0440\u0443\u0431\u0438\u043b\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0430\/env-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0421\u0442\u0430\u043b\u043e \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u0435\u0442 \u043d\u0430\u0448\u0438 \u0445\u043e\u0442\u0435\u043b\u043a\u0438.<\/p>\n<p>  <\/p>\n<h2 id=\"reshenie\">\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<blockquote><p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 laravel \u0432\u0435\u0440\u0441\u0438\u0438 6.2 \u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0411\u0414. \u0412 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 5.x \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 (\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u044f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435 \u0431\u0443\u0434\u0443).<\/p>\n<p>  \u041a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/ddrv\/habrapost481726-laravel-localized-routing\" rel=\"nofollow\">GitHub<\/a><\/p><\/blockquote>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u044f\u0437\u044b\u043a\u0438.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">config\/app.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  return [ \/\/ ...       'locale' =&gt; 'en',     'fallback_locale' =&gt; 'en',     'supported_locales' =&gt; [         'en',         'ru',         'de',         'fr',     ], \/\/ ... ];<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u0439\u0442\u0430 <code>Site<\/code> \u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Entities\/Site.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Entities;  class Site {      \/**      * @var string \u0414\u043e\u043c\u0435\u043d \u0441\u0430\u0439\u0442\u0430      *\/     private $domain;      \/**      * @var string \u042f\u0437\u044b\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e      *\/     private $defaultLanguage;      \/**      * @var string[] \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0430\u0435\u043c\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432      *\/     private $supportedLanguages = [];      \/**      * @param string   $domain             \u0414\u043e\u043c\u0435\u043d      * @param string   $defaultLanguage    \u042f\u0437\u044b\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e      * @param string[] $supportedLanguages \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432      *\/     public function __construct(string $domain, string $defaultLanguage, array $supportedLanguages)     {         $this-&gt;domain = $domain;         $this-&gt;defaultLanguage = $defaultLanguage;         if (!in_array($defaultLanguage, $supportedLanguages)) {             $supportedLanguages[] = $defaultLanguage;         }         $this-&gt;supportedLanguages = $supportedLanguages;     }      \/**      * \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u043e\u043c\u0435\u043d \u0441\u0430\u0439\u0442\u0430      *      * @return string      *\/     public function getDomain(): string     {         return $this-&gt;domain;     }      \/**      * \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u044f\u0437\u044b\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430      *      * @return string      *\/     public function getDefaultLanguage(): string     {         return $this-&gt;defaultLanguage;     }      \/**      * \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u043e\u0432      *      * @return string[]      *\/     public function getSupportedLanguages(): array     {         return $this-&gt;supportedLanguages;     }      \/**      * \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u0430\u0439\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u0430      *      * @param string $language      * @return bool      *\/     public function isLanguageSupported(string $language): bool     {         return in_array($language, $this-&gt;supportedLanguages);     }      \/**      * \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u044f\u0437\u044b\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c      *      * @param string $language      * @return bool      *\/     public function isLanguageDefault(string $language): bool     {         return $language === $this-&gt;defaultLanguage;     } } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Contracts\/SiteDetector.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Contracts;  use App\\Entities\\Site; use Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException;  interface SiteDetector {      \/**      * \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u0430\u0439\u0442 \u043f\u043e \u0445\u043e\u0441\u0442\u0443      *      * @param string $host \u0425\u043e\u0441\u0442      *      * @return Site \u0421\u0443\u0449\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u0439\u0442\u0430      *      * @throws NotFoundHttpException \u0415\u0441\u043b\u0438 \u0441\u0430\u0439\u0442 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d      *\/     public function detect(string $host): Site; } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Services\/SiteDetector\/FakeSiteDetector.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Services\\SiteDetector;  use App\\Contracts\\SiteDetector; use App\\Entities\\Site; use Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException;  \/**  * \u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0430\u0439\u0442\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.  * \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u0441\u0451 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0411\u0414, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0430\u0434\u043c\u0438\u043d\u043a\u0443.  *\/ class FakeSiteDetector implements SiteDetector {      \/**      * @var Site[] \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435      *\/     private $sites;      public function __construct()     {         $sites = [             'localhost' =&gt; [ \/\/ \u0412\u0441\u0435 \u044f\u0437\u044b\u043a\u0438                 'default' =&gt; 'en',                 'support' =&gt; ['ru', 'de', 'fr'],             ],             'site-all.local' =&gt; [ \/\/ \u0412\u0441\u0435 \u044f\u0437\u044b\u043a\u0438                 'default' =&gt; 'en',                 'support' =&gt; ['ru', 'de', 'fr'],             ],             'site-ru.local' =&gt; [ \/\/ \u0422\u043e\u043b\u044c\u043a\u043e \u0440\u0443\u0441\u0441\u043a\u0438\u0439                 'default' =&gt; 'ru',                 'support' =&gt; [],             ],             'site-en.local' =&gt; [                 'default' =&gt; 'en', \/\/ \u0422\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439                 'support' =&gt; [],             ],             'site-de.local' =&gt; [                 'default' =&gt; 'de', \/\/ \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043c\u0435\u0446\u043a\u0438\u0439                 'support' =&gt; [],             ],             'site-fr.local' =&gt; [                 'default' =&gt; 'fr', \/\/ \u0422\u043e\u043b\u044c\u043a\u043e \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u0439                 'support' =&gt; [],             ],             'site-eur.local' =&gt; [ \/\/ \u041d\u0435\u043c\u0435\u0446\u043a\u0438\u0439 \u0438 \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u0439                 'default' =&gt; 'de',                 'support' =&gt; ['fr'],             ],         ];         foreach ($sites as $domain =&gt; $site) {             $default = $site['default'];             $support = array_merge([$default], $site['support']);             $this-&gt;sites[$domain] = new Site($domain, $default, $support);         }     }      public function detect(string $host): Site     {         $host = trim(mb_strtolower($host));         if (!array_key_exists($host, $this-&gt;sites)) {             throw new NotFoundHttpException();         }         return $this-&gt;sites[$host];     } }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Providers\/AppServiceProvider.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Providers;  use App\\Contracts\\SiteDetector; use App\\Services\\SiteDetector\\FakeSiteDetector; use Illuminate\\Support\\ServiceProvider;  class AppServiceProvider extends ServiceProvider {      \/\/ ...      \/**      * Register any application services.      *      * @return void      *\/     public function register()     {         \/\/ ...          \/*          * \u0421\u0442\u0440\u043e\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441.          *\/         $this-&gt;app-&gt;singleton(FakeSiteDetector::class, function () {             return new FakeSiteDetector();         });          \/*          * \u0411\u0438\u043d\u0434\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442          *\/         $this-&gt;app-&gt;bind(SiteDetector::class, FakeSiteDetector::class);         \/\/ ...     }      \/\/ ... } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0440\u043e\u0443\u0442\u044b.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">routes\/web.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  \/\/ ...  Route::get('\/', 'DemoController@home')-&gt;name('web.home'); Route::get('\/--about--', 'DemoController@about')-&gt;name('web.about'); Route::get('\/--contacts--', 'DemoController@contacts')-&gt;name('web.contacts'); Route::get('\/--news--', 'DemoController@news')-&gt;name('web.news');  \/\/ ... <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u0438 \u0440\u043e\u0443\u0442\u043e\u0432, \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043e\u0431\u0440\u0430\u043c\u043b\u0435\u043d\u044b \u0434\u0432\u043e\u0439\u043d\u044b\u043c\u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u043c\u0438 (<code>--<\/code>). \u042d\u0442\u043e \u043c\u0430\u0441\u043a\u0438 \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u044d\u0442\u0438 \u043c\u0430\u0441\u043a\u0438.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">config\/routes.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  return [     'web.about' =&gt; [ \/\/ \u0418\u043c\u044f \u0440\u043e\u0443\u0442\u0430         'about' =&gt; [ \/\/ \u041c\u0430\u0441\u043a\u0430 \u0431\u0435\u0437 \u043e\u0431\u0440\u0430\u043c\u043b\u044f\u044e\u0449\u0438\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432             'de' =&gt; 'uber-uns', \/\/ \u044f\u0437\u044b\u043a =&gt; \u0441\u043b\u0430\u0433             'en' =&gt; 'about-us',             'fr' =&gt; 'a-propos-de-nous',             'ru' =&gt; 'o-nas',         ],     ],     'web.news' =&gt; [         'news' =&gt; [             'de' =&gt; 'nachrichten',             'en' =&gt; 'news',             'fr' =&gt; 'nouvelles',             'ru' =&gt; 'novosti',         ],     ],     'web.contacts' =&gt; [         'contacts' =&gt; [             'de' =&gt; 'kontakte',             'en' =&gt; 'contacts',             'fr' =&gt; 'contacts',             'ru' =&gt; 'kontakty',         ],     ], ]; <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432\u044b\u0431\u043e\u0440\u0430 \u044f\u0437\u044b\u043a\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u044f\u0437\u044b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0430\u0439\u0442\u043e\u043c. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u044c&#8230;<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Http\/Middleware\/ViewData.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Http\\Middleware;  use App\\Contracts\\SiteDetector; use Closure; use Illuminate\\Contracts\\View\\Factory as ViewFactory; use Illuminate\\Contracts\\View\\View; use Illuminate\\Http\\Request;  class ViewData {      \/**      * @var ViewFactory      *\/     private $view;      \/**      * @var SiteDetector      *\/     private $detector;      public function __construct(ViewFactory $view, SiteDetector $detector)     {         $this-&gt;view = $view;         $this-&gt;detector = $detector;     }      public function handle(Request $request, Closure $next)     {         \/*          * \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0430\u0439\u0442          *\/         $site = $this-&gt;detector-&gt;detect($request-&gt;getHost());          \/*          * \u041f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0430\u043d\u0435\u043b\u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u044f\u0437\u044b\u043a\u0430 \u0441\u0441\u044b\u043b\u043a\u0438          *\/         $languages = [];         foreach ($site-&gt;getSupportedLanguages() as $language) {             $url = '\/';             if (!$site-&gt;isLanguageDefault($language)) {                 $url .= $language;             }             $languages[$language] = $url;         }          $this-&gt;view-&gt;composer(['components\/languages'], function(View $view) use ($languages) {             $view-&gt;with('languages', $languages);         });          return $next($request);     } } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u043e\u0443\u0442\u0435\u0440. \u0412\u0435\u0440\u043d\u0435\u0435 \u043d\u0435 \u0441\u0430\u043c \u0440\u043e\u0443\u0442\u0435\u0440, \u0430 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0440\u043e\u0443\u0442\u043e\u0432&#8230;<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Custom\/Illuminate\/Routing\/RouteCollection.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Custom\\Illuminate\\Routing;  use Illuminate\\Routing\\Route; use Illuminate\\Routing\\RouteCollection as BaseRouteCollection; use Serializable;  class RouteCollection extends BaseRouteCollection implements Serializable {      \/**      * @var array \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u043e\u0443\u0442\u043e\u0432.      *\/     private $config;      private $localized = [];      public function setConfig(array $config)     {         $this-&gt;config = $config;     }      \/**      * \u0417\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043c\u0430\u0441\u043a\u0438 \u043b\u043e\u043a\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u043e\u0443\u0442\u043e\u0432.      *      * @param string $language \u042f\u0437\u044b\u043a      *\/     public function localize(string $language)     {         $this-&gt;flushLocalizedRoutes();         foreach ($this-&gt;config as $name =&gt; $placeholders) {             if (!$this-&gt;hasNamedRoute($name) || empty($placeholders)) {                 continue;             }              \/*              * \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u043e\u0443\u0442              *\/             $route = $this-&gt;getByName($name);              \/*              * \u0417\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c              *\/             $this-&gt;localized[$name] = $route;              \/*              * \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0438\u0437 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438              *\/             $this-&gt;removeRoute($route);              \/*              * \u041c\u0435\u043d\u044f\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d              *\/             $new = clone $route;             $uri = $new-&gt;uri();             foreach ($placeholders as $placeholder =&gt; $paths) {                 if (!array_key_exists($language, $paths)) {                     continue;                 }                 $value = $paths[$language];                 $uri = str_replace('--' . $placeholder . '--', $value, $uri);             }             $new-&gt;setUri($uri);             $this-&gt;add($new);         }          \/*          * \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u044b          *\/         $this-&gt;refreshNameLookups();         $this-&gt;refreshActionLookups();     }      private function removeRoute(Route $route)     {         $uri = $route-&gt;uri();         $domainAndUri = $route-&gt;getDomain().$uri;         foreach ($route-&gt;methods() as $method) {             $key = $method.$domainAndUri;             if (array_key_exists($key, $this-&gt;allRoutes)) {                 unset($this-&gt;allRoutes[$key]);             }             if (array_key_exists($uri, $this-&gt;routes[$method])) {                 unset($this-&gt;routes[$method][$uri]);             }         }     }      private function flushLocalizedRoutes()     {         foreach ($this-&gt;localized as $name =&gt; $route) {             \/*              * \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u043e\u0443\u0442              *\/             $old = $this-&gt;getByName($name);              \/*              * \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0438\u0437 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438              *\/             $this-&gt;removeRoute($old);              \/*              * \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439              *\/             $this-&gt;add($route);         }     }      \/**      * @inheritDoc      *\/     public function serialize()     {         return serialize([             'routes' =&gt; $this-&gt;routes,             'allRoutes' =&gt; $this-&gt;allRoutes,             'nameList' =&gt; $this-&gt;nameList,             'actionList' =&gt; $this-&gt;actionList,         ]);     }      \/**      * @inheritDoc      *\/     public function unserialize($serialized)     {         $data = unserialize($serialized);         $this-&gt;routes = $data['routes'];         $this-&gt;allRoutes = $data['allRoutes'];         $this-&gt;nameList = $data['nameList'];         $this-&gt;actionList = $data['actionList'];     } } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u2026, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f &#8230;<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Custom\/Illuminate\/Foundation\/Application.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Custom\\Illuminate\\Foundation;  use App\\Custom\\Illuminate\\Routing\\RouteCollection; use App\\Exceptions\\UnsupportedLocaleException; use Illuminate\\Contracts\\Config\\Repository; use Illuminate\\Foundation\\Application as BaseApplication; use Illuminate\\Routing\\UrlGenerator;  class Application extends BaseApplication {      private $isLocaleEstablished = false;      private $cachedRoutes = [];      public function __construct($basePath = null)     {         parent::__construct($basePath);     }      public function setLocale($locale)     {          \/*          * \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c \u043d\u0430 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0443\u044e, \u043d\u0435 \u0448\u0435\u0432\u0435\u043b\u0438\u043c\u0441\u044f.          *\/         if ($this-&gt;getLocale() === $locale &amp;&amp; $this-&gt;isLocaleEstablished) {             return;         }          \/** @var Repository $config *\/         $config = $this-&gt;get('config');         $urlGenerator = $this-&gt;get('url');          $defaultLocale = $config-&gt;get('app.fallback_locale');         $supportedLocales = $config-&gt;get('app.supported_locales');          \/*          * \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u0438          *\/         if (!in_array($locale, $supportedLocales)) {             throw new UnsupportedLocaleException();         }          \/*          * \u0414\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u0423\u0420\u041b          *\/         if ($defaultLocale !== $locale &amp;&amp; $urlGenerator instanceof UrlGenerator) {             $request = $urlGenerator-&gt;getRequest();             $rootUrl = $request-&gt;getSchemeAndHttpHost() . '\/' . $locale;             $urlGenerator-&gt;forceRootUrl($rootUrl);         }          \/*          * \u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0441\u043c\u0435\u043d\u044b \u043b\u043e\u043a\u0430\u043b\u0438          *\/         parent::setLocale($locale);          \/*          * \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a \u0440\u043e\u0443\u0442\u0430\u043c          *\/         if (array_key_exists($locale, $this-&gt;cachedRoutes)) {             $fn = $this-&gt;cachedRoutes[$locale];             $this-&gt;get('router')-&gt;setRoutes($fn());         } else {             $this-&gt;get('router')-&gt;getRoutes()-&gt;localize($locale);         }         $this-&gt;isLocaleEstablished = true;      }      public function bootstrapWith(array $bootstrappers)     {         parent::bootstrapWith($bootstrappers);          \/**          * \u041f\u043e\u0441\u043b\u0435 \u0431\u0443\u0442\u0441\u0442\u0440\u0430\u043f\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0443 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u043e\u0443\u0442\u043e\u0432          * \u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043b\u043e\u043a\u0430\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e          *          * @var RouteCollection $routes          *\/         $routes = $this-&gt;get('router')-&gt;getRoutes();         $routes-&gt;setConfig($this-&gt;get('config')-&gt;get('routes'));         if ($this-&gt;routesAreCached()) {             \/** @noinspection PhpIncludeInspection *\/             $this-&gt;cachedRoutes = require $this-&gt;getCachedRoutesPath();         }         $this-&gt;setLocale($this-&gt;getLocale());     } } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u2026 \u0438 \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430\u0448\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">bootstrap\/app.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  \/\/ $app = new Illuminate\\Foundation\\Application($_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)); $app = new App\\Custom\\Illuminate\\Foundation\\Application($_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)); $app-&gt;get('router')-&gt;setRoutes(new App\\Custom\\Illuminate\\Routing\\RouteCollection());  \/\/ ...<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430 \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0423\u0420\u041b \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0434 \u0434\u0438\u0441\u043f\u0430\u0442\u0447\u0438\u043d\u0433\u043e\u043c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0435\u0433\u043e \u0441\u0435\u0433\u043c\u0435\u043d\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0441\u0430\u0439\u0442\u043e\u043c, \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0434\u0438\u0441\u043f\u0430\u0442\u0447\u0438\u043d\u0433 \u0441 \u043d\u043e\u0432\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0443\u0436\u0435 \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043c \u043a\u043b\u0430\u0441\u0441 <code>App\\Http\\Kernel<\/code>, \u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430\u0448 \u043c\u0438\u0434\u0434\u043b\u0432\u0430\u0440\u044c <code>App\\Http\\Middleware\\ViewData<\/code> \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 <code>web<\/code><\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Http\/Kernel.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Http;  \/\/ ... use App\\Contracts\\SiteDetector; use App\\Http\\Middleware\\ViewData; use Closure; use Illuminate\\Foundation\\Http\\Kernel as HttpKernel; use Illuminate\\Http\\Request; \/\/ ...  class Kernel extends HttpKernel {      \/\/ ...      \/**      * The application's route middleware groups.      *      * @var array      *\/     protected $middlewareGroups = [         \/\/ ...         'web' =&gt; [             \/\/ ...             ViewData::class,         ],         \/\/ ...     ];      \/\/ ...      \/**      * Get the route dispatcher callback.      *      * @return Closure      *\/     protected function dispatchToRouter()     {         return function (Request $request) {             \/*              * \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0430\u0439\u0442              *\/             \/** @var SiteDetector $siteDetector *\/             $siteDetector = $this-&gt;app-&gt;get(SiteDetector::class);             $site = $siteDetector-&gt;detect($request-&gt;getHost());              \/*              * \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u0423\u0420\u041b              *\/             $segment = (string)$request-&gt;segment(1);              \/*              * \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u0423\u0420\u041b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u043c \u044f\u0437\u044b\u043a\u043e\u0432, \u0437\u043d\u0430\u0447\u0438\u0442 \u044d\u0442\u043e \u044f\u0437\u044b\u043a              *\/             if ($segment &amp;&amp; $site-&gt;isLanguageSupported($segment)) {                 $language = $segment;             } else {                 $language = $site-&gt;getDefaultLanguage();             }              \/*              * \u0417\u0430\u0434\u0430\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043b\u043e\u043a\u0430\u043b\u0435\u0439              *\/             $this-&gt;app-&gt;get('config')-&gt;set('app.supported_locales', $site-&gt;getSupportedLanguages());              \/*              * \u0417\u0430\u0434\u0430\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043b\u043e\u043a\u0430\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e              *\/             $this-&gt;app-&gt;get('config')-&gt;set('app.fallback_locale', $site-&gt;getDefaultLanguage());              \/*              * \u0417\u0430\u0434\u0430\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043b\u043e\u043a\u0430\u043b\u044c              *\/             $this-&gt;app-&gt;setLocale($language);              \/*              * \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u044f\u0437\u044b\u043a \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u044f\u0437\u044b\u043a\u043e\u043c \u0441\u0430\u0439\u0442\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e              *\/             if (!$site-&gt;isLanguageDefault($language)) {                 \/*                  * \u0412\u044b\u0440\u0435\u0437\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u0438\u0437 \u0423\u0420\u041b \u0437\u0430\u043f\u0440\u043e\u0441\u0430.                  *\/                 $server = $request-&gt;server();                 $server['REQUEST_URI'] = mb_substr($server['REQUEST_URI'], mb_strlen($language) + 1);                 $request = $request-&gt;duplicate(                     $request-&gt;query-&gt;all(),                     $request-&gt;all(),                     $request-&gt;attributes-&gt;all(),                     $request-&gt;cookies-&gt;all(),                     $request-&gt;files-&gt;all(),                     $server                 );             }              \/*              * \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u0438\u0441\u043f\u0430\u0442\u0447\u0438\u043d\u0433              *\/             $this-&gt;app-&gt;instance('request', $request);             return $this-&gt;router-&gt;dispatch($request);         };     } } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u043e\u0443\u0442\u044b, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041d\u043e \u043d\u0430 \u0431\u043e\u044e \u0431\u0435\u0437 \u043a\u044d\u0448\u0430 \u2014 \u0438\u0434\u0435\u044f \u043d\u0435 \u0438\u0437 \u043b\u0443\u0447\u0448\u0438\u0445. \u041c\u044b \u0443\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0438 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0440\u043e\u0443\u0442\u044b \u0438\u0437 \u043a\u044d\u0448\u0430, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c. \u041a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>route:cache<\/code><\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Custom\/Illuminate\/Foundation\/Console\/RouteCacheCommand.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Custom\\Illuminate\\Foundation\\Console;  use App\\Custom\\Illuminate\\Routing\\RouteCollection as CustomRouteCollection; use Illuminate\\Routing\\Route; use Illuminate\\Routing\\RouteCollection; use Illuminate\\Foundation\\Console\\RouteCacheCommand as BaseCommand;  class RouteCacheCommand extends BaseCommand {      \/**      * Execute the console command.      *      * @return void      *\/     public function handle()     {         \/*          * \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u0440\u044b\u0439 \u043a\u044d\u0448          *\/         $this-&gt;call('route:clear');          \/*          * \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u043e\u0443\u0442\u044b \u0441\u0432\u0435\u0436\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f          *\/         $routes = $this-&gt;getFreshApplicationRoutes();          if (count($routes) === 0) {             $this-&gt;error(\"Your application doesn't have any routes.\");             return;         }          \/*          * \u041f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u044d\u0448 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c          *\/         $this-&gt;files-&gt;put(             $this-&gt;laravel-&gt;getCachedRoutesPath(), $this-&gt;buildRouteCacheFile($routes)         );          $this-&gt;info('Routes cached successfully!');         return;     }      protected function buildRouteCacheFile(RouteCollection $base)     {         \/*          * \u041a\u044d\u0448 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0431\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.          *           * \u041a\u043b\u044e\u0447 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 - \u043b\u043e\u043a\u0430\u043b\u044c, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 - \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0430\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 Illuminate\\Routing\\RouteCollection          *\/          $code = '&lt;?php' . PHP_EOL . PHP_EOL;         $code .= 'return [' . PHP_EOL;          $stub = '    \\'{{key}}\\' =&gt; function() {return unserialize(base64_decode(\\'{{routes}}\\'));},';         foreach (config('app.supported_locales') as $locale) {             \/** @var CustomRouteCollection|Route[] $routes *\/             $routes = clone $base;             $routes-&gt;localize($locale);             foreach ($routes as $route) {                 $route-&gt;prepareForSerialization();             }             $line = str_replace('{{routes}}', base64_encode(serialize($routes)), $stub);             $line = str_replace('{{key}}', $locale, $line);             $code .= $line . PHP_EOL;         }         $code .= '];' . PHP_EOL;         return $code;     } } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>route:clear<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0444\u0430\u0439\u043b \u043a\u044d\u0448\u0430, \u0415\u0451 \u043c\u044b \u0442\u0440\u043e\u0433\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u0410 \u0432\u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 <code>route:list<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u0435\u0442 \u043e\u043f\u0446\u0438\u044f <code>locale<\/code>.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Custom\/Illuminate\/Foundation\/Console\/RouteListCommand.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Custom\\Illuminate\\Foundation\\Console;  use Illuminate\\Foundation\\Console\\RouteListCommand as BaseCommand; use Symfony\\Component\\Console\\Input\\InputOption;  class RouteListCommand extends BaseCommand {      \/**      * Execute the console command.      *      * @return void      *\/     public function handle()     {         $locales = $this-&gt;option('locale');          \/*          * \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u0438          *\/         foreach ($locales as $locale) {             if ($locale &amp;&amp; in_array($locale, config('app.supported_locales'))) {                 $this-&gt;output-&gt;title($locale);                 $this-&gt;laravel-&gt;setLocale($locale);                 $this-&gt;router = $this-&gt;laravel-&gt;get('router');                 parent::handle();             }         }     }      protected function getOptions()     {         \/*          * \u0412\u0441\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u0438          *\/         $all = config('app.supported_locales');          \/*          * \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043e\u043f\u0446\u0438\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b          *\/         $result = parent::getOptions();          \/*          * \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u043f\u0446\u0438\u044e \u043b\u043e\u043a\u0430\u043b\u0435\u0439          *\/         $result[] = ['locale', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Locales', $all];         return $result;     } } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0421\u0435\u0439\u0447\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0435\u043d\u0434\u043e\u0440\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043d\u0443\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>Illuminate\\Contracts\\Support\\DeferrableProvider<\/code>. \u041c\u0435\u0442\u043e\u0434 <code>provides()<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043a\u043b\u044e\u0447\u0435\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u0440\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">app\/Providers\/CommandsReplaceProvider.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  namespace App\\Providers;  use App\\Custom\\Illuminate\\Foundation\\Console\\RouteCacheCommand; use App\\Custom\\Illuminate\\Foundation\\Console\\RouteListCommand; use Illuminate\\Contracts\\Foundation\\Application; use Illuminate\\Contracts\\Support\\DeferrableProvider; use Illuminate\\Support\\ServiceProvider;  class CommandsReplaceProvider extends ServiceProvider implements DeferrableProvider {      \/**      * Register any application services.      *      * @return void      *\/     public function register()     {         $this-&gt;app-&gt;singleton('command.route.cache', function (Application $app) {             return new RouteCacheCommand($app-&gt;get('files'));         });          $this-&gt;app-&gt;singleton('command.route.list', function (Application $app) {             return new RouteListCommand($app-&gt;get('router'));         });         $this-&gt;commands($this-&gt;provides());     }      public function provides()     {         return [             'command.route.cache',             'command.route.list',         ];     } } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041d\u0443 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">config\/app.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  return [     \/\/ ...     'providers' =&gt; [         App\\Providers\\CommandsReplaceProvider::class,     ],     \/\/ ... ];<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442!<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">user@host laravel-localized-routing $ .\/artisan route:list  en ==  +--------+----------+----------+--------------+-------------------------+------------+ | Domain | Method   | URI      | Name         | Action                  | Middleware | +--------+----------+----------+--------------+-------------------------+------------+ |        | GET|HEAD | \/        | web.home     | DemoController@home     | web        | |        | GET|HEAD | about-us | web.about    | DemoController@about    | web        | |        | GET|HEAD | contacts | web.contacts | DemoController@contacts | web        | |        | GET|HEAD | news     | web.news     | DemoController@news     | web        | +--------+----------+----------+--------------+-------------------------+------------+  ru ==  +--------+----------+----------+--------------+-------------------------+------------+ | Domain | Method   | URI      | Name         | Action                  | Middleware | +--------+----------+----------+--------------+-------------------------+------------+ |        | GET|HEAD | \/        | web.home     | DemoController@home     | web        | |        | GET|HEAD | kontakty | web.contacts | DemoController@contacts | web        | |        | GET|HEAD | novosti  | web.news     | DemoController@news     | web        | |        | GET|HEAD | o-nas    | web.about    | DemoController@about    | web        | +--------+----------+----------+--------------+-------------------------+------------+  de ==  +--------+----------+-------------+--------------+-------------------------+------------+ | Domain | Method   | URI         | Name         | Action                  | Middleware | +--------+----------+-------------+--------------+-------------------------+------------+ |        | GET|HEAD | \/           | web.home     | DemoController@home     | web        | |        | GET|HEAD | kontakte    | web.contacts | DemoController@contacts | web        | |        | GET|HEAD | nachrichten | web.news     | DemoController@news     | web        | |        | GET|HEAD | uber-uns    | web.about    | DemoController@about    | web        | +--------+----------+-------------+--------------+-------------------------+------------+  fr ==  +--------+----------+------------------+--------------+-------------------------+------------+ | Domain | Method   | URI              | Name         | Action                  | Middleware | +--------+----------+------------------+--------------+-------------------------+------------+ |        | GET|HEAD | \/                | web.home     | DemoController@home     | web        | |        | GET|HEAD | a-propos-de-nous | web.about    | DemoController@about    | web        | |        | GET|HEAD | contacts         | web.contacts | DemoController@contacts | web        | |        | GET|HEAD | nouvelles        | web.news     | DemoController@news     | web        | +--------+----------+------------------+--------------+-------------------------+------------+ <\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/481726\/\"> https:\/\/habr.com\/ru\/post\/481726\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/481726\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ri\/a5\/l4\/ria5l4vqjfp7yxunyvblqh4ybdy.png\" alt=\"\u041a\u0414\u041f\u0412\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  <\/p>\n<p>\u0425\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0440\u043e\u0443\u0442\u0438\u043d\u0433\u043e\u043c \u0438 \u043a\u0430\u043a \u043c\u044b \u0435\u0451 \u0440\u0435\u0448\u0430\u043b\u0438.<\/p>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u0441\u0430\u043c\u044b\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u0430\u0439\u0442\u043e\u043c. \u0421\u0430\u0439\u0442 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0441\u044f, \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u043b\u0430\u0441\u044c \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u043d\u0430 \u0431\u0430\u0437\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Laravel \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e (\u043d\u0443\u0436\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u043b\u0441\u044f \u0438\u0437 \u0441\u0435\u0441\u0441\u0438\u0438, \u043b\u0438\u0431\u043e \u0431\u0440\u0430\u043b\u0441\u044f \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439). \u041c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b, \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u043a\u043b\u044e\u0447\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0444\u0440\u0430\u0437 \u0438 \u0432\u0437\u044f\u043b\u0438 \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0438\u0447\u0438.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-296406","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=296406"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/296406\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=296406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=296406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=296406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}