{"id":331,"date":"2024-04-19T21:03:15","date_gmt":"2024-04-19T18:03:15","guid":{"rendered":"https:\/\/road-to-heaven.viro35.ru\/?page_id=331"},"modified":"2024-04-23T11:53:37","modified_gmt":"2024-04-23T08:53:37","slug":"%d1%81%d0%b2%d1%8f%d0%b7%d0%b8-%d1%82%d0%b0%d0%b1%d0%bb%d0%b8%d1%86","status":"publish","type":"page","link":"https:\/\/road-to-heaven.viro35.ru\/?page_id=331","title":{"rendered":"\u0421\u0432\u044f\u0437\u0438 \u0442\u0430\u0431\u043b\u0438\u0446"},"content":{"rendered":"\n<p>$workers-&gt;pluck(&#8216;some_attr&#8217;) &#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442<\/p>\n\n\n\n<p>$workers-&gt;pluck(&#8216;some_attr&#8217;)-&gt;unique() &#8212; \u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041e\u0434\u0438\u043d \u043a \u043e\u0434\u043d\u043e\u043c\u0443<\/h2>\n\n\n\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u043e\u0432 workers \u0438 \u0438\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 profiles.<\/p>\n\n\n\n<p>\u0412 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 profiles, worker_id \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b workers. \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0431\u0430\u0437\u044b.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$table-&gt;foreignId('worker_id')-&gt;index()-&gt;constrained('workers');<\/code><\/pre>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043c\u043e\u0434\u0435\u043b\u044c Profile (\u0442\u0430\u0431\u043b\u0438\u0446\u044b profiles) \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0432\u044f\u0437\u044c \u0443\u0436\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043b\u0430\u0440\u0430\u0432\u0435\u043b\u044c.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> public function worker()\n  {\n    return $this-&gt;belongsTo(Worker::class, 'worker_id', 'id');\n  }<\/code><\/pre>\n\n\n\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Worker (\u0442\u0430\u0431\u043b\u0438\u0446\u044b workers). <\/p>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0430 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b profiles. \u0412 \u043e\u0442\u0432\u0435\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0430 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b workers<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$profile = Profile::find(1);\n$worker_data = $profile-&gt;worker-&gt;toArray();<\/code><\/pre>\n\n\n\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u0432 \u043c\u043e\u0434\u0435\u043b\u044c Worker \u0442\u0430\u0431\u043b\u0438\u0446\u044b workers \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u0441\u0432\u044f\u0437\u044c  \u043d\u043e \u0443\u0436\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0435<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> public function profile()<br>  {<br>    return $this-&gt;hasOne(Profile::class, 'worker_id', 'id');<br>  }<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u041e\u0434\u0438\u043d \u043a\u043e \u043c\u043d\u043e\u0433\u0438\u043c<\/h2>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u043e\u0432 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0435 positions. \u0423 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u043e\u0432.<\/p>\n\n\n\n<p>\u0412 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b workers \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u044f\u0437\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0431\u0430\u0437\u044b \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 positions<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$table-&gt;foreignId('position_id')-&gt;nullable()-&gt;index()-&gt;constrained('positions');<\/code><\/pre>\n\n\n\n<p>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 Worker \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0430<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public function position()\n  {\n    return $this-&gt;belongsTo(Position::class, 'position_id', 'id');\n  }<\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u0438<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$worker = Worker::find(1);\n$position_data = $worker-&gt;position-&gt;toArray();<\/code><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u0441\u0435\u0445 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u043e\u0432 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0434\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 Position \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> public function workers()\n  {\n    return $this-&gt;hasMany(Worker::class, 'position_id', 'id');\n  }<\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u043e\u0432<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$position = Position::find(1);\n$workers_list = $position-&gt;workers-&gt;toArray();<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u041c\u043d\u043e\u0433\u0438\u0435 \u043a\u043e \u043c\u043d\u043e\u0433\u0438\u043c<\/h2>\n\n\n\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0433\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u043e\u0432 \u0438 \u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php artisan make:model ProjectWorker -m<\/code><\/pre>\n\n\n\n<p>\u0412 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u0432\u044f\u0437\u044c \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u043e \u0447\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0430<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$table-&gt;foreignId('project_id')-&gt;index()-&gt;constrained('projects');\n$table-&gt;foreignId('worker_id')-&gt;index()-&gt;constrained('workers');\n$table-&gt;unique(&#91;'project_id','worker_id']);<\/code><\/pre>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043c\u043e\u0434\u0435\u043b\u044c Project. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0432\u0441\u0435\u0445 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u043e\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> public function workers()\n  {\n    return $this-&gt;belongsToMany(Worker::class, 'project_workers', 'project_id', 'worker_id');\n  }<\/code><\/pre>\n\n\n\n<p>\u041a\u043b\u0430\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0442\u043e\u0440\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u044d\u0442\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b  \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$project = Project::find(1);\n$workers_list = $project-&gt;workers-&gt;toArray();<\/code><\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u0430, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043c\u043e\u0434\u0435\u043b\u044c Worker \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> public function projects()\n  {\n    return $this-&gt;belongsToMany(Project::class, 'project_workers', 'worker_id', 'project_id');\n  }<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u0417\u0430\u043f\u0438\u0441\u044c \u0432 \u0431\u0430\u0437\u0443<\/h2>\n\n\n\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0441\u0432\u044f\u0437\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b, \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$worker= Worker::find(1);\n$project = Project::find(1);\n$worker-&gt;projects()-&gt;attach($project-&gt;id);<\/code><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0442\u0430\u0440\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0431\u0440\u0430\u0442\u044c, \u0435\u0441\u0442\u044c \u0441\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 sync. \u0423\u0434\u0430\u043b\u0435\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438 \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$worker-&gt;projects()-&gt;sync($project-&gt;id);<\/code><\/pre>\n\n\n\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0432 attach \u0438 sync \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0414\u043e\u043f \u043f\u0440\u0438\u043a\u043e\u043b\u044b \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f<\/h2>\n\n\n\n<p>hasOneThrough \u0438 hasManyThrough (22\/23 \u0437\u0430\u043f\u0438\u0441\u0438)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>$workers-&gt;pluck(&#8216;some_attr&#8217;) &#8212; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 $workers-&gt;pluck(&#8216;some_attr&#8217;)-&gt;unique() &#8212; \u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u041e\u0434\u0438\u043d \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0430\u0431\u043e\u0442\u043d\u0438\u043a\u043e\u0432 workers \u0438 \u0438\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0432&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-331","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/road-to-heaven.viro35.ru\/index.php?rest_route=\/wp\/v2\/pages\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/road-to-heaven.viro35.ru\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/road-to-heaven.viro35.ru\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/road-to-heaven.viro35.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/road-to-heaven.viro35.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=331"}],"version-history":[{"count":34,"href":"https:\/\/road-to-heaven.viro35.ru\/index.php?rest_route=\/wp\/v2\/pages\/331\/revisions"}],"predecessor-version":[{"id":375,"href":"https:\/\/road-to-heaven.viro35.ru\/index.php?rest_route=\/wp\/v2\/pages\/331\/revisions\/375"}],"wp:attachment":[{"href":"https:\/\/road-to-heaven.viro35.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}