{"id":300736,"date":"2020-03-25T15:00:50","date_gmt":"2020-03-25T15:00:50","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=300736"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=300736","title":{"rendered":"\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c Laravel \u0437\u0430 \u0441\u0447\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/493320\/\">\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0421\u041c\u0421-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<br \/>  \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u2014 \u0431\u043b\u043e\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441 \u0447\u0435\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c), \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0440\u0435\u0448\u0430\u0442\u044c \u0432\u043e\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432.<\/p>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u0445 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b Laravel. \u0422\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>Cache <\/code>\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430: <code>file<\/code>, <code>memcached<\/code> \u0438\u043b\u0438 <code>redis<\/code>.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0414\u0440\u0430\u0439\u0432\u0435\u0440\u0430<\/h4>\n<p>  \u041a\u0430\u043a \u0433\u043b\u0430\u0441\u0438\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u0441\u0442\u0443\u043b\u0430\u0442\u043e\u0432: \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0439\u0442\u0435 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u0430 \u043d\u0435 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>  \u0421 \u043d\u0435\u0433\u043e \u0438 \u043d\u0430\u0447\u043d\u0435\u043c, \u043d\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442. \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442, \u043f\u043e \u0441\u0443\u0442\u0438, \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<pre><code class=\"php\">interface SmsContract {     public function send(); } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430, \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442. \u041e\u0431\u0449\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441.<\/p>\n<pre><code class=\"php\">abstract class Driver implements SmsContract {     protected $message;      protected $recipient;      public function to($phoneNumber)     {         $this-&gt;recipient = $phoneNumber;     }      public function content($message)     {         $this-&gt;message = $message;     }      abstract public function send(); } <\/code><\/pre>\n<p>  \u0410 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u043e\u0433\u0438\u043a\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043e\u043f\u0438\u0448\u0435\u043c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430.<\/p>\n<pre><code class=\"php\">class SmsRuDriver extends Driver {     protected $client;      protected $from;      public function __construct(SmsRuClient $smsRuClient, $from)     {         $this-&gt;client = $smsRuClient;         $this-&gt;from = $from;     }      public function send()     {         return $this-&gt;client-&gt;sendSms([             'type' =&gt; 'text',             'from' =&gt; $this-&gt;from,             'to' =&gt; $this-&gt;recipient,             'text' =&gt; trim($this-&gt;message)         ]);     } } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"php\">class SmartSenderDriver extends Driver {     protected $client;      protected $from;      public function __construct(SmartSenderClient $smartSenderClient, $from)     {         $this-&gt;client = $smartSenderClient;         $this-&gt;from = $from;     }      public function send()     {         return $this-&gt;client-&gt;message()-&gt;send([             'type' =&gt; 'text',             'from' =&gt; $this-&gt;from,             'to' =&gt; $this-&gt;recipient,             'text' =&gt; trim($this-&gt;message)         ]);     } } <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c<\/h4>\n<p>  \u0414\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043b\u0430\u0441\u0441 <code>SmsManager<\/code>, \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/laravel.com\/docs\/5.0\/extending#managers-and-factories\" rel=\"nofollow\"><code>Manager<\/code><\/a>.<\/p>\n<pre><code class=\"php\">use Illuminate\\Support\\Manager;  class SmsManager extends Manager {     public function setDriver($name = null)     {         return $this-&gt;driver($name);     }      public function createSmsRuDriver(): SmsContract     {         return new SmsRuDriver(             $this-&gt;createSmsRuClient(),             $this-&gt;app['config']['sms.sms_ru.from']         );     }      public function createSmartSenderDriver(): SmsContract     {         return new SmartSenderDriver(             $this-&gt;createSmartSenderClient(),             $this-&gt;app['config']['sms.smart_sender.from']         );     }      public function getDefaultDriver()     {         return $this-&gt;app['config']['sms.default'];     }      protected function createSmsRuClient()     {         return new SmsRuClient(             $this-&gt;app['config']['sms.sms_ru.key'],             $this-&gt;app['config']['sms.sms_ru.secret']         );     }      protected function createSmartSenderClient()     {         return new SmartSenderClient(             $this-&gt;app['config']['sms.smart_sender.key'],             $this-&gt;app['config']['sms.smart_sender.secret']         );     }  } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u043a\u043b\u0430\u0441\u0441 <code>SmsManager <\/code>\u0443\u043a\u0430\u0436\u0435\u0442 \u043d\u0430\u0448\u0435\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043a\u043e\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0421\u041c\u0421-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. <\/p>\n<h4>\u0424\u0430\u0441\u0430\u0434<\/h4>\n<p>  \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043c <a href=\"https:\/\/laravel.com\/docs\/5.8\/facades\" rel=\"nofollow\">\u0444\u0430\u0441\u0430\u0434<\/a>.<br \/>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0430\u043c \u043a\u043b\u0430\u0441\u0441 \u0444\u0430\u0441\u0430\u0434\u0430:<\/p>\n<pre><code class=\"php\">use Illuminate\\Support\\Facades\\Facade;  class Sms extends Facade {     protected static function getFacadeAccessor()     {         return 'sms';     } } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043b\u0430\u0441\u0441 <code>SmsManager <\/code>\u0441 \u0444\u0430\u0441\u0430\u0434\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/laravel.com\/docs\/5.8\/providers\" rel=\"nofollow\">\u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430<\/a> \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c.<\/p>\n<pre><code class=\"php\">class SmsServiceProvider extends ServiceProvider {     protected $defer = true;          public function register()     {         $this-&gt;app-&gt;singleton('sms', function ($app) {             return new SmsManager($app);         });     }          public function providers()     {         return ['sms'];     } } <\/code><\/pre>\n<p>  \u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430\u043c\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 (<code>app\/config\/app.php<\/code>).<\/p>\n<pre><code class=\"php\">'providers' =&gt; [     ...     App\\Providers\\SmsServiceProvider::class, ],     <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u043d \u0444\u0430\u0441\u0430\u0434 \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439, \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0421\u041c\u0421-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"php\">Sms::to($phone)-&gt;content('Beware! He`s not who he is')-&gt;send(); <\/code><\/pre>\n<p>  \u0418\u043b\u0438, \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440:<\/p>\n<pre><code class=\"php\">Sms::setDriver('sms_ru')-&gt;to($phone)-&gt;content('why don`t you answer me?')-&gt;send(); <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0412\u044b\u0432\u043e\u0434<\/h2>\n<p>  \u041d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u041c\u043e\u0441\u0442, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u0430\u0441\u0441 <code>SmsManager<\/code>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0430\u043c \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<br \/>  \u0424\u0430\u0441\u0430\u0434 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h4>\u0421\u0441\u044b\u043b\u043a\u0438<\/h4>\n<p>  <a href=\"https:\/\/github.com\/laravel\/socialite\" rel=\"nofollow\"><b>Laravel <\/b>Socialite<\/a> \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u0446.\u0441\u0435\u0442\u0438<\/div>\n<p> \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\/493320\/\"> https:\/\/habr.com\/ru\/post\/493320\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/493320\/\">\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0421\u041c\u0421-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430.<\/p>\n<h2>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<br \/>  \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u2014 \u0431\u043b\u043e\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441 \u0447\u0435\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c), \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0440\u0435\u0448\u0430\u0442\u044c \u0432\u043e\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432.<\/p>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u0445 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b Laravel. \u0422\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>Cache <\/code>\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430: <code>file<\/code>, <code>memcached<\/code> \u0438\u043b\u0438 <code>redis<\/code>.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.  <\/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-300736","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300736","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=300736"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300736\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}