{"id":356249,"date":"2024-05-20T23:25:37","date_gmt":"2024-05-20T23:25:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=356249"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=356249","title":{"rendered":"<span>\u0418\u043c\u043f\u043e\u0440\u0442 \u0431\u0430\u0437\u044b \u0413\u0410\u0420 \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u0432 Laravel 10. \u0427\u0430\u0441\u0442\u044c II, \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0420\u0435\u0448\u0430\u0435\u043c\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u0417\u043d\u0430\u044f UUID \u0434\u043e\u043c\u0430 (\u0440\u0430\u043d\u0435\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0424\u0418\u0410\u0421) \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u0433\u043e\u0440\u043e\u0434, \u0443\u043b\u0438\u0446\u0443 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430 \u0434\u043b\u044f <strong>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430<\/strong>, \u0438 \u043d\u0430 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0420\u0421\u0423\u0411\u0414 \u2014 PostgeSQL, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u2014 Laravel 10.<\/p>\n<h3>\u041a\u043e\u043c\u0443 \u0435\u0449\u0451 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b<\/h3>\n<p>\u0412\u0441\u0435\u043c, \u043a\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0445\u043e\u0436\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. \u0422\u0435\u043c, \u043a\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u0442 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u0433\u043e, \u0442.\u0435. \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0432 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0432\u043e\u0438 \u0431\u0430\u0437\u044b, \u043d\u0430\u0445\u043e\u0434\u044f \u00ab\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0424\u0418\u0410\u0421\u00bb \u043f\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0433\u043e\u0440\u043e\u0434\u043e\u0432, \u0443\u043b\u0438\u0446 \u0438 \u0442.\u043f. \u0410 \u0442\u0430\u043a \u0436\u0435 \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0431\u0430\u0437\u044b \u0413\u0410\u0420, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0435\u0448\u0430\u0435\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<h2>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/h2>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/763828\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u0430\u0437\u044b \u0413\u0410\u0420<\/a> \u0441 \u0446\u0435\u043b\u044c\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0432\u043e\u044e \u0431\u0430\u0437\u0443<\/p>\n<h2>\u0427\u0442\u043e \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438?<\/h2>\n<p><a href=\"#prolog\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u043b\u043e\u0433<\/a><\/p>\n<p><a href=\"#app_only\" rel=\"noopener noreferrer nofollow\">\u0414\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445<\/a><\/p>\n<p><a href=\"#application_concept\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/p>\n<p><a href=\"#system_requirements\" rel=\"noopener noreferrer nofollow\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/a><\/p>\n<p><a href=\"#creating_application\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u043e\u0439\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/p>\n<p><a href=\"#migrations\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439<\/a><\/p>\n<p><a href=\"#download_full_gar\" rel=\"noopener noreferrer nofollow\">\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0431\u0430\u0437\u044b \u0413\u0410\u0420<\/a><\/p>\n<p><a href=\"#extract_full_gar\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430<\/a><\/p>\n<p><a href=\"#import_full_gar\" rel=\"noopener noreferrer nofollow\">\u041f\u0430\u0440\u0441\u0438\u043d\u0433 xml \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 (Job) \u043d\u0430 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/a><\/p>\n<p><a href=\"#common_gar\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f\u00a0\u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0411\u0414<\/a><\/p>\n<p><a href=\"#inherited_classes\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/a><\/p>\n<p><a href=\"#insert_job\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/a><\/p>\n<p><a href=\"#queue_processing\" rel=\"noopener noreferrer nofollow\">\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/a><\/p>\n<p><a href=\"#create_view\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f (VIEW) \u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c<\/a><\/p>\n<p><a href=\"#actualization\" rel=\"noopener noreferrer nofollow\">\u00ab\u0410\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u00bb \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<p><a href=\"#together\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435<\/a><\/p>\n<p><a class=\"anchor\" name=\"prolog\" id=\"prolog\"><\/a><\/p>\n<h2>\u041f\u0440\u043e\u043b\u043e\u0433<\/h2>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/763828\/\" rel=\"noopener noreferrer nofollow\">\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0431\u0430\u0437\u044b \u0413\u0410\u0420. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0445\u043e\u0442\u0435\u043b \u043a\u043e\u0440\u043e\u0442\u0435\u043d\u0435\u0447\u043a\u043e \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0443\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0432\u044b\u0448\u043b\u043e \u043a\u0430\u043a \u0432 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u0435\u0434\u0438\u0438: <a href=\"https:\/\/youtu.be\/HwZen0Z81Mg\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0440\u043e\u0442\u0435\u043d\u044c\u043a\u043e, \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 40<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0440\u0430\u0437\u0434\u0435\u043b \u0434\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u043d \u0443\u0431\u0440\u0430\u043d \u0432 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u044b. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u0421\u0423\u0411\u0414 PostgreSQL \u0438 MariaDB. \u0415\u0441\u043b\u0438 \u044f \u0447\u0442\u043e-\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0443\u043f\u0443\u0441\u0442\u0438\u043b, \u043f\u0438\u0448\u0438\u0442\u0435. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p><a class=\"anchor\" name=\"app_only\" id=\"app_only\"><\/a><\/p>\n<h2>\u0414\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445<\/h2>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 <a href=\"https:\/\/github.com\/IggorGor\/gar\" rel=\"noopener noreferrer nofollow\">github.com<\/a> \u0438\u043b\u0438 \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u043e\u043c<\/p>\n<pre><code class=\"bash\">git clone git@github.com:IggorGor\/gar.git<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438<\/p>\n<pre><code class=\"bash\">cd gar sudo chown -R $USER:www-data storage sudo chown -R $USER:www-data bootstrap\/cache chmod -R 775 storage chmod -R 775 bootstrap\/cache<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;.env&#187;>.env<\/abbr> \u0438 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;config\/gar.php&#187;>config\/gar.php<\/abbr> \u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u0431\u0430\u0437\u0430 \u043d\u0435 PostgreSQL, \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c <strong>gar<\/strong>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"#system_requirements\" rel=\"noopener noreferrer nofollow\">\u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439<\/a>. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/p>\n<pre><code class=\"bash\">composer install --no-dev --optimize-autoloader<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code class=\"bash\">php artisan migrate<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d wget (\u0435\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044f \u0438 \u0434\u043b\u044f Windows). \u0415\u0441\u043b\u0438 \u043f\u0443\u0442\u044c \u043a wget \u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0432 PATH, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0443\u0442\u0438\u043b\u0438\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;config\/gar.php&#187;>config\/gar.php<\/abbr>.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <\/p>\n<pre><code>php artisan gar:complete-full-import<\/code><\/pre>\n<p>\u0414\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c \u0435\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0412\u0440\u0435\u043c\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430.<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&lt;p>&lt;\/p>&#187; data-abbr=&#187;gar.gar.gar_data_by_uuid&#187;>gar.gar_data_by_uuid<\/abbr> \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c<\/p>\n<pre><code class=\"sql\">select * from gar.gar_data_by_uuid where city_name = '\u041d\u043e\u0432\u043e-\u0422\u0430\u043b\u0438\u0446\u044b' and street_name = '5-\u044f \u0418\u0437\u0443\u043c\u0440\u0443\u0434\u043d\u0430\u044f'<\/code><\/pre>\n<p>\u0418\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043c\u043e\u0434\u0435\u043b\u044c\u044e <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;Models\\Gar\\GarDataByUUID&#187;>Models\\Gar\\GarDataByUUID<\/abbr><\/p>\n<pre><code class=\"php\">$result = GarDataByUUID::where('house_object_guid', '=',   '5cef293c-745f-4053-bed6-05466f2758f4')   ->first();<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043d\u0438\u0437\u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b. \u041f\u043e\u0434\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0430\u0439\u043c\u0430\u0443\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432\u043e\u0440\u043a\u0435\u0440\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 (Job).  \u0423\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438\u0437 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 <a href=\"#loading_time\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u0412 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>gar:full-download<\/strong> \u2014 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<br \/><strong>gar:full-extract<\/strong> \u2014 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438<br \/><strong>gar:full-import <\/strong>\u2014 \u0441\u0442\u0430\u0432\u0438\u0442 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 xml \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0411\u0414<br \/><strong>gar:start-workers<\/strong> \u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 Laravel<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c <a href=\"#actualization\" rel=\"noopener noreferrer nofollow\">\u0441\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u00ab\u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00bb<\/a> \u043d\u0435\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"application_concept\" id=\"application_concept\"><\/a><\/p>\n<h2>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0435\u0435 web-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e PHP, wget \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u0431\u0430\u0437\u044b \u0413\u0410\u0420 \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0438\u043b\u0438 \u043f\u043e \u0432\u044b\u0437\u043e\u0432\u0443 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041f\u0430\u0440\u0441\u0438\u0442 \u0444\u0430\u0439\u043b\u044b, \u0432 \u043e\u0431\u044a\u0451\u043c\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u043c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 (<a href=\"https:\/\/habr.com\/ru\/articles\/763828\/\" rel=\"noopener noreferrer nofollow\">\u0441\u043c. \u0447\u0430\u0441\u0442\u044c I<\/a>) \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438\u0445 \u0432 \u0431\u0430\u0437\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432 \u0438 \u0438\u0437 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b pg_dump \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0430 production \u0441\u0435\u0440\u0432\u0435\u0440. \u0422\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0435\u0433\u0438\u043e\u043d), \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 \u0434\u0432\u0443\u0445 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p><a class=\"anchor\" name=\"system_requirements\" id=\"system_requirements\"><\/a><\/p>\n<h2>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.php.net\/downloads\" rel=\"noopener noreferrer nofollow\">php<\/a> \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435 \u043d\u0438\u0436\u0435 8.1, \u0443\u0442\u0438\u043b\u0438\u0442\u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;wget&#187;>wget<\/abbr>, <a href=\"https:\/\/getcomposer.org\/\" rel=\"noopener noreferrer nofollow\">composer<\/a>, \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0420\u0421\u0423\u0411\u0414 <a href=\"https:\/\/www.postgresql.org\/download\/\" rel=\"noopener noreferrer nofollow\">PostgreSQL<\/a>.<\/p>\n<p><strong>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0421\u0423\u0411\u0414, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 Laravel?<\/strong><\/p>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PostgreSQL, \u043d\u043e \u0437\u0430\u0442\u0435\u043c, \u043f\u043e \u043f\u0440\u043e\u0441\u044c\u0431\u0430\u043c \u0442\u0440\u0443\u0434\u044f\u0449\u0438\u0445\u0441\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 MariaDB. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u0434\u0430, \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f PostgreSQL \u0438 MariaDB.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 PostgreSQL \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0442\u0435\u043c \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0432 \u0431\u044d\u043a\u0430\u043f, \u0438 \u044d\u0442\u043e\u0442 \u0431\u044d\u043a\u0430\u043f \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0434\u0435.<\/p>\n<p>\u0414\u043b\u044f MariaDB \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 (\u0441\u0445\u0435\u043c\u0430 \u0432 MariaDB \u044d\u0442\u043e \u0441\u0438\u043d\u043e\u043d\u0438\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0445\u0435\u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c \u0438\u0434\u0451\u0442 \u043a\u0430\u043a &#171;schema.table&#187;. \u0415\u0441\u043b\u0438 \u0438\u043c\u044f \u0441\u0445\u0435\u043c\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0411\u0414, \u0442\u043e \u0434\u043b\u044f MariaDB \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e.<\/p>\n<p><strong>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PHP \u043d\u0438\u0436\u0435 8.1?<\/strong><\/p>\n<p>\u041c\u043e\u0436\u043d\u043e, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0441\u0430\u0434\u0430 <strong>Illuminate\\Support\\Facades\\Process<\/strong>. \u0412\u043f\u0440\u043e\u0447\u0435\u043c \u0432\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0434\u043e\u0431\u0440\u043e\u0433\u043e exec(), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <strong>match()<\/strong>, \u0438 \u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 php \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u0436\u0435 \u0432\u043e\u0441\u044c\u043c\u0451\u0440\u043a\u0438.<\/p>\n<p><a class=\"anchor\" name=\"creating_application\" id=\"creating_application\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u043e\u0439\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">composer create-project laravel\/laravel gar<\/code><\/pre>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c<\/p>\n<pre><code class=\"bash\">cd gar<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430<\/p>\n<pre><code class=\"bash\">sudo chown -R $USER:www-data storage sudo chown -R $USER:www-data bootstrap\/cache chmod -R 775 storage chmod -R 775 bootstrap\/cache<\/code><\/pre>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code class=\"bash\">rm .\/database\/migrations\/2014_10_12_000000_create_users_table.php rm .\/database\/migrations\/2014_10_12_100000_create_password_reset_tokens_table.php rm .\/database\/migrations\/2019_12_14_000001_create_personal_access_tokens_table.php rm .\/database\/factories\/UserFactory.php rm .\/app\/Models\/User.php rm .\/config\/sanctum.php<\/code><\/pre>\n<p>\u041e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435: \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0432 <strong>Laravel<\/strong> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <strong>sanctum<\/strong>, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>personal_access_tokens<\/strong>. \u041f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. <strong>sanctum<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <strong>vendor<\/strong>. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0443\u0434\u0430\u043b\u044f\u0435\u043c <strong>sanctum<\/strong><\/p>\n<pre><code>composer remove laravel\/sanctum<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443: \u00abClass &#171;Laravel\\Sanctum\\Sanctum&#187; not found\u00bb, \u0442.\u043a. \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u0443: \u00abuse Laravel\\Sanctum\\Sanctum;\u00bb<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 <strong>.env<\/strong>.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. <strong>\u0412\u0430\u0436\u043d\u043e! <\/strong>\u0415\u0441\u043b\u0438 \u0421\u0423\u0411\u0414 \u043e\u0442\u043b\u0438\u0447\u043d\u0430 \u043e\u0442 PostgreSQL \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0440\u043e\u0433\u043e \u00ab<strong>gar<\/strong>\u00bb. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u044b \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439, \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 <a href=\"#inherited_classes\" rel=\"noopener noreferrer nofollow\">\u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/a>.<\/p>\n<p><strong>QUEUE_CONNECTION<\/strong> \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u043e\u0442 <strong>sync<\/strong>, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u043e\u0438\u0442 <strong>database<\/strong>.<\/p>\n<p>\u041d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0437\u0430\u043f\u0438\u0441\u0430\u0432 \u0432 <strong>APP_DEBUG=false<\/strong>, \u0430 \u0432 <strong>APP_ENV=production<\/strong>.<\/p>\n<p>\u042d\u0442\u043e \u0440\u0435\u0448\u0438\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u0443\u0442\u0435\u0447\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0449\u0430\u0434\u043d\u043e \u0443\u0442\u0435\u043a\u0430\u043b\u0430 \u043f\u0430\u043c\u044f\u0442\u044c. \u0412\u043e\u043e\u0440\u0443\u0436\u0438\u0432\u0448\u0438\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <strong>memory_get_usage()<\/strong> \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043c\u043e\u0435\u0439 \u0432\u0438\u043d\u044b \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442. \u041f\u0430\u043c\u044f\u0442\u044c \u0442\u0435\u043a\u043b\u0430 \u0438\u0437-\u0437\u0430 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0438 \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u0431\u0438\u0440\u0430\u043b\u043e\u0441\u044c \u0441\u0432\u0435\u0440\u0445 \u043c\u0435\u0440\u044b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u043e, \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432<\/p>\n<pre><code class=\"bash\">composer install --no-dev<\/code><\/pre>\n<p>\u041a\u043e\u043c\u043f\u043e\u0437\u0435\u0440 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442 \u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u0437\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0442\u044c.<\/p>\n<p><a class=\"anchor\" name=\"migrations\" id=\"migrations\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439<\/h2>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e xsd \u0441\u0445\u0435\u043c\u0430\u043c, \u0441 \u0443\u0447\u0451\u0442\u043e\u043c <a href=\"https:\/\/habr.com\/ru\/articles\/763828#gar_mismatches\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439<\/a>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439 \u0442\u0438\u043f \u043f\u043e\u043b\u0435\u0439 \u0432\u044b\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0440\u043e\u043a \u0441 \u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u043d\u0443\u043b\u0451\u043c &#8217;01&#8217; \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0441\u044f \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f.<\/p>\n<p>\u0412 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u044b. \u0422\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (VIEW) \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446 \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u0432 \u0421\u0423\u0411\u0414 PostgreSQL \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f 14 \u043c\u0438\u043d\u0443\u0442. \u042f \u0441\u0447\u0451\u043b \u044d\u0442\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c. \u041d\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 <a href=\"#loading_time\" rel=\"noopener noreferrer nofollow\">\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u2014 \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u043a \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445 \u043d\u0435\u0442. \u041f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"bash\">php artisan queue:table<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0432 \u0447\u0430\u0441\u0442\u0438 I<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u043e\u0435. \u0417\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0442.\u043a. \u043e\u043d\u0430 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0441\u0445\u0435\u043c\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043e\u0442 public, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u0438 \u043f\u043e\u043b\u044f created_at\/updated_at, \u0438 \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f. <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b8d\/e08\/2a8\/b8de082a80f57797aa9d18165dcc77ed.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b house_params\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b house_params\" width=\"492\" height=\"429\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b8d\/e08\/2a8\/b8de082a80f57797aa9d18165dcc77ed.png\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b house_params<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0445\u0435\u043c\u0443 \u00abgar\u00bb. \u0421\u0430\u043c\u0430 \u0441\u0445\u0435\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <strong>.env<\/strong>. \u0415\u0441\u043b\u0438 \u0421\u0423\u0411\u0414 \u043e\u0442\u043b\u0438\u0447\u043d\u0430 \u043e\u0442 pgsql, \u0442\u043e \u0441\u0445\u0435\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<pre><code class=\"bash\">php artisan make:migration create_schema_gar<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 create_schema_gar<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration;  return new class extends Migration {     public function up(): void     {         if (config('database.default') === 'pgsql') DB::unprepared('create schema if not exists gar');     }      public function down(): void     {         if (config('database.default') === 'pgsql') DB::unprepared('drop schema if exists gar');     } };<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 addr_objs<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\AddrObjs -m<\/code><\/pre>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f xxxx_xx_xx_xxxxxx_<strong>create_addr_objs_table.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  return new class extends Migration {     public function up(): void     {         Schema::create('gar.addr_objs', function (Blueprint $table) {             $table->id();             $table->bigInteger('object_id')->comment('\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->index('object_id');             $table->uuid('object_guid')->comment('\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->index('object_guid');             $table->bigInteger('change_id')->comment('ID \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438');             $table->string('name', 250)->comment('\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435');             $table->string('type_name', 50)->comment('\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->integer('level')->comment('\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->index('level');             $table->integer('oper_type_id')->comment('\u0421\u0442\u0430\u0442\u0443\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0434 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u2013 \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->bigInteger('prev_id')->nullable()->comment('\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e');             $table->bigInteger('next_id')->nullable()->comment('\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e');             $table->date('update_date')->comment('\u0414\u0430\u0442\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f) \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('start_date')->comment('\u041d\u0430\u0447\u0430\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('end_date')->comment('\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->boolean('is_actual')->comment('\u0421\u0442\u0430\u0442\u0443\u0441 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0424\u0418\u0410\u0421');             $table->boolean('is_active')->comment('\u041f\u0440\u0438\u0437\u043d\u0430\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430');         });     }      public function down(): void     {         Schema::dropIfExists('gar.addr_objs');     } };<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <strong>Models\/Gar\/AddrObjs.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\Models\\Gar; use Illuminate\\Database\\Eloquent\\Model;  class AddrObj extends Model {     protected $table = 'gar.addr_objs';     public $timestamps = false;     public $incrementing = false;     protected $guarded = []; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 adm_hierarchies<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\AdmHierarchy -m<\/code><\/pre>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f xxxx_xx_xx_xxxxxx_<strong>create_adm_hierarchies_table.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  return new class extends Migration {     public function up(): void     {         Schema::create('gar.adm_hierarchies', function (Blueprint $table) {             $table->id();             $table->bigInteger('object_id')->comment('\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->index('object_id');             $table->bigInteger('parent_obj_id')->comment('\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->index('parent_obj_id');             $table->bigInteger('change_id')->comment('ID \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438');             $table->string('region_code', 4)->nullable()->comment('\u041a\u043e\u0434 \u0440\u0435\u0433\u0438\u043e\u043d\u0430');             $table->string('area_code', 4)->nullable()->comment('\u041a\u043e\u0434 \u0440\u0430\u0439\u043e\u043d\u0430');             $table->string('city_code', 4)->nullable()->comment('\u041a\u043e\u0434 \u0433\u043e\u0440\u043e\u0434\u0430');             $table->string('place_code', 4)->nullable()->comment('\u041a\u043e\u0434 \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430');             $table->string('plan_code', 4)->nullable()->comment('\u041a\u043e\u0434 \u042d\u041f\u0421');             $table->string('street_code', 4)->nullable()->comment('\u041a\u043e\u0434 \u0443\u043b\u0438\u0446\u044b');             $table->bigInteger('prev_id')->nullable()->comment('\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e');             $table->bigInteger('next_id')->nullable()->comment('\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e');             $table->date('update_date')->comment('\u0414\u0430\u0442\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f) \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('start_date')->comment('\u041d\u0430\u0447\u0430\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('end_date')->comment('\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->boolean('is_active')->comment('\u041f\u0440\u0438\u0437\u043d\u0430\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->string('path')->comment('\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 (\u043f\u043e\u043b\u043d\u0430\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f)');         });     }      public function down(): void     {         Schema::dropIfExists('gar.adm_hierarchies');     } };<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <strong>Models\/Gar\/AdmHierarchy.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\Models\\Gar;  use Illuminate\\Database\\Eloquent\\Model;  class AdmHierarchy extends Model {     protected $table = 'gar.adm_hierarchies';     public $timestamps = false;     public $incrementing = false;     protected $guarded = [];  }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 houses<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\House -m<\/code><\/pre>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f xxxx_xx_xx_xxxxxx_<strong>create_houses_table.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  return new class extends Migration {     public function up(): void     {         Schema::create('gar.houses', function (Blueprint $table) {             $table->id();             $table->bigInteger('object_id')->comment('\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->index('object_id');             $table->uuid('object_guid')->comment('\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->index('object_guid');             $table->bigInteger('change_id')->comment('ID \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0435\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438');             $table->string('house_num', 50)->nullable()->comment('\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430');             $table->string('add_num_1', 50)->nullable()->comment('\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430 1');             $table->string('add_num_2', 50)->nullable()->comment('\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430 2');             $table->bigInteger('house_type')->nullable()->comment('\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0438\u043f \u0434\u043e\u043c\u0430');             $table->index('house_type');             $table->bigInteger('add_type_1')->nullable()->comment('\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u043e\u043c\u0430 1');             $table->index('add_type_1');             $table->bigInteger('add_type_2')->nullable()->comment('\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u043e\u043c\u0430 2');             $table->index('add_type_2');             $table->integer('oper_type_id')->comment('\u0421\u0442\u0430\u0442\u0443\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0434 \u0437\u0430\u043f\u0438\u0441\u044c\u044e \u2013 \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->bigInteger('prev_id')->nullable()->comment('\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e');             $table->bigInteger('next_id')->nullable()->comment('\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u044c\u044e');             $table->date('update_date')->comment('\u0414\u0430\u0442\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f) \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('start_date')->comment('\u041d\u0430\u0447\u0430\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('end_date')->comment('\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->boolean('is_actual')->comment('\u0421\u0442\u0430\u0442\u0443\u0441 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0424\u0418\u0410\u0421');             $table->boolean('is_active')->comment('\u041f\u0440\u0438\u0437\u043d\u0430\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430');         });     }      public function down(): void     {         Schema::dropIfExists('gar.houses');     } };<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <strong>Models\/Gar\/House.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\Models\\Gar;  use Illuminate\\Database\\Eloquent\\Model;  class House extends Model {     protected $table = 'gar.houses';     public $timestamps = false;     public $incrementing = false;     protected $guarded = []; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 houses_add_types<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\HouseAddType -m<\/code><\/pre>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f xxxx_xx_xx_xxxxxx_<strong>create_house_add_types_table.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  return new class extends Migration {     public function up(): void     {         Schema::create('gar.house_add_types', function (Blueprint $table) {             $table->id();             $table->string('name', 250)->comment('\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435');             $table->string('short_name', 50)->nullable()->comment('\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435');             $table->string('desc', 250)->nullable()->comment('\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435');             $table->date('update_date')->comment('\u0414\u0430\u0442\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f) \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('start_date')->comment('\u041d\u0430\u0447\u0430\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('end_date')->comment('\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->boolean('is_active')->comment('\u0421\u0442\u0430\u0442\u0443\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438');         });     }      public function down(): void     {         Schema::dropIfExists('gar.house_add_types');     } };<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <strong>Models\/Gar\/HouseAddType.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\Models\\Gar;  use Illuminate\\Database\\Eloquent\\Model;  class HouseAddType extends Model {     protected $table = 'gar.house_add_types';     public $timestamps = false;     public $incrementing = false;     protected $guarded = []; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 house_params<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\HouseParam -m<\/code><\/pre>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f xxxx_xx_xx_xxxxxx_<strong>create_house_params_table.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  return new class extends Migration {     public function up(): void     {         Schema::create('gar.house_params', function (Blueprint $table) {             $table->id();             $table->bigInteger('object_id');             $table->index('object_id');             $table->bigInteger('change_id');             $table->integer('change_id_end');             $table->integer('type_id');             $table->index('type_id');             $table->string('value');             $table->date('update_date')->comment('\u0414\u0430\u0442\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f) \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('start_date')->comment('\u041d\u0430\u0447\u0430\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('end_date')->comment('\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->index('end_date');         });     }      public function down(): void     {         Schema::dropIfExists('gar.house_params');     } };<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <strong>Models\/Gar\/HouseParam.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\Models\\Gar; use Illuminate\\Database\\Eloquent\\Model;  class HouseParam extends Model {     protected $table = 'gar.house_params';     public $timestamps = false;     public $incrementing = false;     protected $guarded = []; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 house_types<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\HouseType -m<\/code><\/pre>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f xxxx_xx_xx_xxxxxx_<strong>create_house_types_table.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  return new class extends Migration {     public function up(): void     {         Schema::create('gar.house_types', function (Blueprint $table) {             $table->id();             $table->string('name', 250)->comment('\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435');             $table->string('short_name', 50)->comment('\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435');             $table->string('desc', 250)->comment('\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435');             $table->date('update_date')->comment('\u0414\u0430\u0442\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f) \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('start_date')->comment('\u041d\u0430\u0447\u0430\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('end_date')->comment('\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->boolean('is_active')->comment('\u0421\u0442\u0430\u0442\u0443\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438');         });     }      public function down(): void     {         Schema::dropIfExists('gar.house_types');     } };<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <strong>Models\/Gar\/HouseType.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\Models\\Gar;  use Illuminate\\Database\\Eloquent\\Model;  class HouseType extends Model {     protected $table = 'gar.house_types';     public $timestamps = false;     public $incrementing = false;     protected $guarded = [];  }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 object_levels<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\ObjectLevel -m<\/code><\/pre>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f xxxx_xx_xx_xxxxxx_<strong>create_object_levels_table.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  return new class extends Migration {     public function up(): void     {         Schema::create('gar.object_levels', function (Blueprint $table) {             $table->id()->comment('\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0438. \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u043f\u043e\u043b\u0435. \u041d\u043e\u043c\u0435\u0440 \u0443\u0440\u043e\u0432\u043d\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430');             $table->string('name', 250)->comment('\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435');             $table->string('short_name', 50)->nullable()->comment('\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435');             $table->date('update_date')->comment('\u0414\u0430\u0442\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f) \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('start_date')->comment('\u041d\u0430\u0447\u0430\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('end_date')->comment('\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->boolean('is_active')->comment('\u0421\u0442\u0430\u0442\u0443\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438');         });     }      public function down(): void     {         Schema::dropIfExists('gar.object_levels');     } };<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <strong>Models\/Gar\/ObjectLevel.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\Models\\Gar;  use Illuminate\\Database\\Eloquent\\Model;  class ObjectLevel extends Model {     protected $table = 'gar.object_levels';     public $timestamps = false;     public $incrementing = false;     protected $guarded = []; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 param_types<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\ParamType -m<\/code><\/pre>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f xxxx_xx_xx_xxxxxx_<strong>create_param_types_table.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  return new class extends Migration {     public function up(): void     {         Schema::create('gar.param_types', function (Blueprint $table) {             $table->id();             $table->string('name');             $table->string('desc');             $table->string('code');             $table->boolean('is_active');             $table->date('update_date')->comment('\u0414\u0430\u0442\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f (\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f) \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('start_date')->comment('\u041d\u0430\u0447\u0430\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');             $table->date('end_date')->comment('\u041e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438');         });     }      public function down(): void     {         Schema::dropIfExists('gar.param_types');     } };<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <strong>Models\/Gar\/ParamType.php<\/strong><\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\Models\\Gar;  use Illuminate\\Database\\Eloquent\\Model;  class ParamType extends Model {     protected $table = 'gar.param_types';     public $timestamps = false;     public $incrementing = false;     protected $guarded = []; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<p>\u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0432\u0440\u0435\u043c\u044f \u0435\u0451 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043e\u043a<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Version -m<\/code><\/pre>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u044f<\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  return new class extends Migration {     public function up(): void     {         Schema::create('versions', function (Blueprint $table) {             $table->id();             $table->string('version');             $table->timestamps();         });     }      public function down(): void     {         Schema::dropIfExists('versions');     } };<\/code><\/pre>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c<\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\Models;  use Illuminate\\Database\\Eloquent\\Model;  class Version extends Model {     protected $guarded = ['id']; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code class=\"bash\">php artisan migrate<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 production, artisan \u0432\u044b\u0434\u0430\u0441\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. \u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439.<\/p>\n<p>\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0433\u043e\u0442\u043e\u0432\u0430. \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u0430\u0437\u044b \u0413\u0410\u0420 (\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435 \u0437\u0430 \u0442\u0430\u0432\u0442\u043e\u043b\u043e\u0433\u0438\u044e).<\/p>\n<p><a class=\"anchor\" name=\"download_full_gar\" id=\"download_full_gar\"><\/a><\/p>\n<h2>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0431\u0430\u0437\u044b \u0413\u0410\u0420<\/h2>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0439 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"http:\/\/fias.nalog.ru\/WebServices\/Public\/GetLastDownloadFileInfo\" rel=\"noopener noreferrer nofollow\">http:\/\/fias.nalog.ru\/WebServices\/Public\/GetLastDownloadFileInfo<\/a> \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0441\u0435\u0440\u0432\u0438\u0441, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 JSON, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0430\u0437\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 URL \u0430\u0434\u0440\u0435\u0441\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 diff-\u0430\u0440\u0445\u0438\u0432. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 PHP. \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0430\u0440\u0445\u0438\u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b 39GB \u0438 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0442\u0438, \u0442.\u043a. \u0431\u0430\u0437\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435, \u043d\u0435\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>copy()<\/strong> \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0430\u043b\u043e\u043c. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u043e\u0434\u0440\u043e \u0440\u0430\u043f\u043e\u0440\u0442\u043e\u0432\u0430\u043b\u0430 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438, \u043d\u043e \u0430\u0440\u0445\u0438\u0432 \u0431\u0430\u0437\u044b \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0441\u044f \u0431\u0438\u0442\u044b\u043c. \u041e\u043f\u044b\u0442\u044b \u0432 \u0434\u043e\u043b\u0436\u043d\u043e\u043c \u043e\u0431\u044a\u0451\u043c\u0435 \u043c\u0435\u0448\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430\u043b\u043e\u0433\u043e\u0432\u0430\u044f. \u041f\u043e\u0441\u043b\u0435 \u0434\u0432\u0443\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0439 IP \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f. \u041a\u0430\u043a \u043e\u0431\u043e\u0439\u0442\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0443 <a href=\"#alternate_download\" rel=\"noopener noreferrer nofollow\">\u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435<\/a>.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0441\u0430\u0434 Http \u2014 \u043e\u0431\u0451\u0440\u0442\u043a\u0443 \u043d\u0430\u0434 Guzzle. \u0414\u0435\u043b\u043e \u0442\u043e\u0436\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043b\u0430\u0447\u0435\u0432\u043d\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b29\/3ad\/a3a\/b293ada3acc0a4db57e3ff432491314d.png\" width=\"974\" height=\"47\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b29\/3ad\/a3a\/b293ada3acc0a4db57e3ff432491314d.png\"\/><\/figure>\n<p>\u0422\u043e\u0433\u0434\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u0443\u044e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <strong>wget<\/strong>. \u0415\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044f \u0438 \u0434\u043b\u044f Windows, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u0435\u0431\u044f \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. <strong>wget<\/strong> \u0446\u0435\u043f\u043b\u044f\u043b\u0441\u044f \u0432 \u0444\u0430\u0439\u043b \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u0451\u0440\u0442\u0432\u043e\u0439 \u0445\u0432\u0430\u0442\u043a\u043e\u0439, \u0438 \u043d\u0435 \u043e\u0442\u043f\u0443\u0441\u043a\u0430\u043b \u0435\u0433\u043e, \u043f\u043e\u043a\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043b \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043b\u043e\u0433 <strong>wget<\/strong>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u0438\u043b\u043e\u0441\u044c 18 \u0447\u0430\u0441\u043e\u0432 20 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<details class=\"spoiler\">\n<summary>\u041b\u043e\u0433 wget<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/02c\/26e\/dfe\/02c26edfe1ffad9e040f0511c8bbdc9e.png\" alt=\"\u041b\u043e\u0433 wget \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u0438\u043b\u043e\u0441\u044c 18 \u0447\u0430\u0441\u043e\u0432 20 \u043c\u0438\u043d\u0443\u0442\" title=\"\u041b\u043e\u0433 wget \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u0438\u043b\u043e\u0441\u044c 18 \u0447\u0430\u0441\u043e\u0432 20 \u043c\u0438\u043d\u0443\u0442\" width=\"1084\" height=\"497\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/02c\/26e\/dfe\/02c26edfe1ffad9e040f0511c8bbdc9e.png\"\/><\/p>\n<div><figcaption>\u041b\u043e\u0433 wget \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u0438\u043b\u043e\u0441\u044c 18 \u0447\u0430\u0441\u043e\u0432 20 \u043c\u0438\u043d\u0443\u0442<\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 <strong>wget<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0441\u0430\u0434 <strong>Process<\/strong>. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e. <\/p>\n<p>\u0422.\u043a. \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435, \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 artisan \u043a\u043e\u043c\u0430\u043d\u0434\u0430. \u041f\u043b\u044e\u0441\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430: \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430 \u0440\u0443\u043a\u0430\u043c\u0438, \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0435 Laravel \u0438\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0438\u0437 cron \/ \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 Windows, \u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a Laravel \u043d\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">php artisan make:command GarFullDownloadCommand<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 app\/Console\/Commands\/GarFullDownloadCommand.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Console\\Commands;  use App\\Services\\GarService; use Exception; use Illuminate\\Console\\Command;  class GarFullDownloadCommand extends Command {     protected $signature = 'gar:full-download';      protected $description = 'Command download full GAR archive from server';      public function handle(): void     {         GarService::downloadFullGarArchive();     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 handle \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0434\u0451\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043a\u043b\u0430\u0441\u0441\u0443 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;GarService&#187;>GarService<\/abbr>. \u042d\u0442\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0431\u0440\u0430\u043d\u0430 \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438. <\/p>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 app \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 Services, \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043b\u0430\u0441\u0441 GarService.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043b\u0430\u0441\u0441 GarService<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services;  class GarService {  }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;downloadFullGarArchive()&#187;>downloadFullGarArchive()<\/abbr>.<\/p>\n<details class=\"spoiler\">\n<summary>GarService::downloadFullGarArchive()<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php   public static function downloadFullGarArchive(): bool     {         $result = Http::get('https:\/\/fias.nalog.ru\/WebServices\/Public\/GetLastDownloadFileInfo');         if ($result->ok()) {             $garArray = json_decode($result->body(), true);             $version = Version::select('version')->latest()->limit(1)->first();             if (is_null($version) or $version->version &lt; $garArray['VersionId']) {                 GarService::initDirectories();                   GarService::deleteOldFullZipFile();                 GarService::deleteOldLogFile();                 $cmd = GarService::getCmd($garArray['GarXMLFullURL']);                 $processResult = Process::forever()->run($cmd);                 return $processResult->successful();             }         }         return false;     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0441\u0430\u0434\u0430 Http \u0438\u0434\u0451\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"https:\/\/fias.nalog.ru\/WebServices\/Public\/GetLastDownloadFileInfo\" rel=\"noopener noreferrer nofollow\">https:\/\/fias.nalog.ru\/WebServices\/Public\/GetLastDownloadFileInfo<\/a>. \u0412 \u043e\u0442\u0432\u0435\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 JSON<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/68c\/3fd\/c83\/68c3fdc834a8b9d8fd302bbe71785a58.png\" width=\"897\" height=\"285\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/68c\/3fd\/c83\/68c3fdc834a8b9d8fd302bbe71785a58.png\"\/><\/figure>\n<p>\u0418\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;versions&#187;>versions<\/abbr> \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435, \u0438\u043b\u0438 \u043d\u043e\u043c\u0435\u0440 \u0432 \u0431\u0430\u0437\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430, \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433 gar (\u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0449\u0451 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d), \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u043b\u043e\u0433\u0438, \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;wget&#187;>wget<\/abbr> c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0435\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. <\/p>\n<p>\u0421\u0430\u043c \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0441\u0430\u0434\u0430 Process<\/p>\n<pre><code class=\"bash\">$processResult = Process::forever()->run($cmd);<\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;forever()&#187;>forever()<\/abbr> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430 \u0440\u0430\u0432\u043d\u044b\u043c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438, \u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;run()&#187;>run()<\/abbr> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e.<\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c GarService \u0435\u0449\u0451 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php     private static function getCmd(string $downloadUrl): string     {         if (config('gar.download_mode') == 'alternate')             $downloadUrl = str_replace('fias-file', 'fias', $downloadUrl);         return config('gar.wget_path') . 'wget ' . $downloadUrl . \" -O \" .             Storage::path(config('gar.xml_full_zip_file_name')) . \" -o \" . Storage::path(config('gar.wget_log_file_name'));     }      private static function initDirectories(): void     {         if (!Storage::directoryExists('gar')) Storage::makeDirectory('gar');     }      public static function deleteOldFullZipFile(): void     {         if (Storage::exists(config('gar.xml_full_zip_file_name')))             Storage::delete(config('gar.xml_full_zip_file_name'));     }      public static function deleteOldLogFile(): void     {         if (Storage::exists(config('gar.xml_full_zip_file_name')))             Storage::delete(config('gar.xml_full_zip_file_name'));     } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u0435\u0440\u0432\u0438\u0441 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u0444\u0430\u0439\u043b\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0421\u0430\u043c \u0444\u0430\u0439\u043b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;config\/gar.php&#187;>config\/gar.php<\/abbr>.<\/p>\n<details class=\"spoiler\">\n<summary>\u0412\u043e\u0442 \u0435\u0433\u043e \u043a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  return [     \/\/ \u041a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430     'region_code' => 37,      \/\/ \u041f\u0443\u0442\u044c \u043a \u0430\u0440\u0445\u0438\u0432\u0443 \u043f\u043e\u043b\u043d\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0413\u0410\u0420     'xml_full_zip_file_name' => 'gar\/gar_full_xml.zip',      \/\/ \u041f\u0443\u0442\u044c \u043a \u043b\u043e\u0433\u0443 \u0443\u0442\u0438\u043b\u0438\u0442\u044b wget     'wget_log_file_name' => 'gar\/wget.log',      \/\/ \u041f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443, \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0430\u0440\u0445\u0438\u0432\u0430 \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u043e\u0439     'unzip_full_path' => 'gar\/unzip\/full',      \/\/ \u041f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u043c\u0443 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 wget     'wget_path' => 'D:\/OSPanel\/modules\/wget\/bin\/',      \/\/ \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: 0 \u2014 \u043d\u0435 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c, 1 \u2014 \u043a\u0440\u0430\u0442\u043a\u0438\u0435 \u043b\u043e\u0433\u0438, 2 \u2014 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u043b\u043e\u0433\u0438     'log_level' => 1, \/\/ 0, 1, 2      \/\/ \u0420\u0435\u0436\u0438\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f: normal \u2014 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430, alternate \u2014 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0441 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 (\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e)     'download_mode' => 'normal', ]; <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. <\/p>\n<p><a class=\"anchor\" name=\"alternate_download\" id=\"alternate_download\"><\/a><\/p>\n<p>\u041e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;download_mode&#187;>download_mode<\/abbr>: \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 IP \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438 \u043d\u0435 \u0443\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;fias-file.nalog.ru&#187;>fias-file.nalog.ru<\/abbr> \u043d\u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;fias.nalog.ru&#187;>fias.nalog.ru<\/abbr>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u043a\u0440\u043e\u043c\u043d\u043e\u0439, \u043d\u043e \u0437\u0430\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0434\u043e\u043c\u0435\u043d\u0435 \u043d\u0435 \u0431\u0430\u043d\u044f\u0442 \u043d\u0430\u043b\u0435\u0432\u043e \u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043e. \u0427\u0442\u043e\u0431\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u043e\u0434\u043c\u0435\u043d\u0443, \u0437\u0430\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;download_mode&#187;>download_mode<\/abbr> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 alternate.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u043f\u043e\u043b\u043d\u043e\u0439 \u0431\u0430\u0437\u044b. \u041d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">php artisan gar:full-download<\/code><\/pre>\n<p>\u0438 \u0438\u0434\u0438\u0442\u0435 \u043e\u0431\u0435\u0434\u0430\u0442\u044c. \u0427\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Laravel \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 app\\gar\\gar_full_xml.zip (\u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e).<\/p>\n<p><a class=\"anchor\" name=\"extract_full_gar\" id=\"extract_full_gar\"><\/a><\/p>\n<h2>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0443\u0436\u043d\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (\u043e\u0431\u0449\u0438\u0445 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u0432) \u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430. \u041d\u043e\u043c\u0435\u0440 \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u0437\u0430\u0434\u0430\u043d \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;config\/gar.php&#187;>config\/gar.php<\/abbr>.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/www.php.net\/manual\/ru\/class.ziparchive.php\" rel=\"noopener noreferrer nofollow\">ZipArchive<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>GarService::extractFullGar() +<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php     public static function extractFullGar(): bool     {         $zip = new ZipArchive();         $status = $zip->open(Storage::path(config('gar.xml_full_zip_file_name')));         if ($status !== true) return false;         else {             self::deleteOldUnzipFiles();             self::makeUnzipDirectory();             $extractArray = self::getExtractFiles($zip);             if (count($extractArray) != 0)                 $zip->extractTo(Storage::path(config('gar.unzip_full_path')), $extractArray);          }         $zip->close();         return true;     }      private static function deleteOldUnzipFiles(): void     {         if (Storage::directoryExists(config('gar.unzip_full_path')))             Storage::deleteDirectory(config('gar.unzip_full_path'));     }      private static function makeUnzipDirectory(): void     {         if (!Storage::directoryExists(config('gar.unzip_full_path'))) {             Storage::makeDirectory(config('gar.unzip_full_path'));         }     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0447\u0430\u0441\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0430 \u0432 \u043c\u0435\u0442\u043e\u0434 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;extractTo()&#187;>extractTo()<\/abbr> \u043a\u043b\u0430\u0441\u0441\u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;ZipAcrchive&#187;>ZipAcrchive<\/abbr> \u0432\u0442\u043e\u0440\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u043c\u0451\u043d \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445\u0441\u044f \u0432 \u0430\u0440\u0445\u0438\u0432\u0435, \u0438 \u0437\u0430\u043d\u0435\u0441\u0442\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044e.<\/p>\n<details class=\"spoiler\">\n<summary>GarService::getExtractFiles()<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    private static function getExtractFiles(ZipArchive $zip): array     {         $extractArray = [];         for ($i = 0; $i &lt; $zip->count(); $i++) {             $fileName = $zip->getNameIndex($i);             $dir = dirname($fileName);             if (($dir == '.' or $dir == config('gar.region_code')) and self::verifyFileName($fileName))                 $extractArray[] = $fileName;         }         return $extractArray;     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;verifyFileName()&#187;>verifyFileName()<\/abbr><\/p>\n<details class=\"spoiler\">\n<summary>GarService::verifyFileName()<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    private static function verifyFileName(string $fileName): bool     {         foreach (self::$regFileNames as $regFileName) {             if (preg_match($regFileName, basename($fileName))) return true;         }         return false;     } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 strpos \u0431\u044b\u043b\u043e \u0431\u044b \u043b\u0443\u0447\u0448\u0438\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c. \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432 \u043c\u0430\u0441\u0441\u0438\u0432. \u042d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430, \u0438\u0437\u0432\u043b\u0451\u0447\u0451\u043d\u043d\u043e\u0433\u043e \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>GarService::$regFileNames<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    private static array $regFileNames = [         'AS_OBJECT_LEVELS' => '\/^AS_OBJECT_LEVELS_\\d{8}_[0-9abcdef]{8}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{12}.XML$\/i',         'AS_HOUSE_TYPES' => '\/^AS_HOUSE_TYPES_\\d{8}_[0-9abcdef]{8}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{12}.XML$\/i',         'AS_ADDHOUSE_TYPES' => '\/^AS_ADDHOUSE_TYPES_\\d{8}_[0-9abcdef]{8}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{12}.XML$\/i',         'AS_PARAM_TYPES' => '\/^AS_PARAM_TYPES_\\d{8}_[0-9abcdef]{8}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{12}.XML$\/i',         'AS_HOUSES_PARAMS' => '\/^AS_HOUSES_PARAMS_\\d{8}_[0-9abcdef]{8}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{12}.XML$\/i',         'AS_ADDR_OBJ' => '\/^AS_ADDR_OBJ_\\d{8}_[0-9abcdef]{8}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{12}.XML$\/i',         'AS_ADM_HIERARCHY' => '\/^AS_ADM_HIERARCHY_\\d{8}_[0-9abcdef]{8}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{12}.XML$\/i',         'AS_HOUSES' => '\/^AS_HOUSES_\\d{8}_[0-9abcdef]{8}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{4}-[0-9abcdef]{12}.XML$\/i',     ];<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code class=\"bash\">php artisan make:command GarFullExtractCommand<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 app\/Console\/Commands\/GarFullExtractCommand.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Console\\Commands;  use App\\Services\\GarService; use Exception; use Illuminate\\Console\\Command;  class GarFullExtractCommand extends Command {     protected $signature = 'gar:full-extract';      protected $description = 'Command unzips the necessary files from the general upload';      \/**      * @throws Exception      *\/     public function handle(): void     {         GarService::extractFullGar();     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code class=\"bash\">php artisan gar:full-extract<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u044b \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430 \u0438 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Laravel \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 app\/gar\/unzip\/full.<\/p>\n<p><a class=\"anchor\" name=\"import_full_gar\" id=\"import_full_gar\"><\/a><\/p>\n<h2>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 xml \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 (Job) \u043d\u0430 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/h2>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c .xml \u0444\u0430\u0439\u043b \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.php.net\/manual\/ru\/book.simplexml.php\" rel=\"noopener noreferrer nofollow\">SimpleXML<\/a>. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u043c\u0435\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432, \u0432 \u043a\u043e\u0442\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. \u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0442.\u043a. \u0444\u0430\u0439\u043b\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0447\u0435\u043d\u044c \u00ab\u0442\u044f\u0436\u0451\u043b\u044b\u0435\u00bb, \u0430 SimpleXML \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u00ab\u0433\u0438\u0431\u0440\u0438\u0434\u043d\u044b\u0439\u00bb \u043f\u043e\u0434\u0445\u043e\u0434. \u0427\u0438\u0442\u0430\u0442\u044c .xml \u0444\u0430\u0439\u043b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430 XMLReader, \u0437\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0443\u0437\u0435\u043b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 \u043a\u043b\u0430\u0441\u0441 SimpleXMLElement \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438. \u0411\u043b\u0430\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0441 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c \u0443\u0441\u0438\u043b\u0438\u0439.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u0445\u0435\u043c\u0430 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438, \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b houses<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;HOUSES>   &lt;HOUSE ... \/>   &lt;HOUSE ... \/>   ...   &lt;HOUSE ... \/> &lt;\/HOUSES><\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0424\u0430\u0439\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u0438\u043d \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043b\u043e\u0436\u0435\u043d\u044b \u043f\u0443\u0441\u0442\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b. \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u0434\u043e\u043c\u0443, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c. \u0412\u043c\u0435\u0441\u0442\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043e\u043d\u0438 \u043c\u043e\u0433\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0435\u0440\u0435\u0432\u043e, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u0438\u0434\u0438 \u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0439.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u0449\u0443\u044e \u0438\u0434\u0435\u044e \u0440\u0430\u0437\u0431\u043e\u0440\u0430 .xml (\u043c\u0430\u043b\u043e\u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0439 \u043a\u043e\u0434 \u043e\u043f\u0443\u0449\u0435\u043d)<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u0438\u0434\u0435\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">\/\/ \u0427\u0438\u0442\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u044b\u0439\u0434\u0435\u043c \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 while ($xml->read() &amp;&amp; $xml->name !== 'HOUSE') ; \/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0446\u0438\u043a\u043b \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0432\u043d\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443 while ($xml->name === 'HOUSE') {   \/\/ \u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u044b?   if ($xml->hasAttributes) {     \/\/ \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432     $node = (array)simplexml_load_string($xml->readOuterXml());     $node = $node['@attributes'];   }   $xml->next('HOUSE'); }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f $node \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432<\/p>\n<details class=\"spoiler\">\n<summary>\u041c\u0430\u0441\u0441\u0438\u0432<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">array:14 [   \"ID\" => \"50008317\"   \"OBJECTID\" => \"82641773\"   \"OBJECTGUID\" => \"5d99249e-64b6-4f59-8e53-2bcac59be3cd\"   \"CHANGEID\" => \"122770604\"   \"HOUSENUM\" => \"298\"   \"HOUSETYPE\" => \"2\"   \"OPERTYPEID\" => \"10\"   \"PREVID\" => \"0\"   \"NEXTID\" => \"71774225\"   \"UPDATEDATE\" => \"2021-10-08\"   \"STARTDATE\" => \"2014-02-13\"   \"ENDDATE\" => \"2021-10-08\"   \"ISACTUAL\" => \"0\"   \"ISACTIVE\" => \"0\" ]<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0432 \u043d\u0443\u0436\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0418, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043f\u0440\u0438 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043d\u0443\u0436\u043d\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0437\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437.<\/p>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u044b\u0448\u0435\u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u044e \u043a\u043b\u0430\u0441\u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c Laravel<\/p>\n<pre><code class=\"bash\">php artisan make:job ImportGar<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Jobs;  use Illuminate\\Bus\\Queueable; use Illuminate\\Contracts\\Queue\\ShouldQueue; use Illuminate\\Foundation\\Bus\\Dispatchable; use Illuminate\\Queue\\InteractsWithQueue; use Illuminate\\Queue\\SerializesModels; use Illuminate\\Support\\Facades\\Storage; use XMLReader;  class ImportGar implements ShouldQueue {     use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;      public int $timeout = 60 * 60;     public int $tries = 1;      public function __construct(         public string $fileName,         public string $nodeName,         public string $serviceName     )     {     }      public function handle(): void     {         if (Storage::fileExists($this->fileName)) {             $this->xmlParse();         }     }      private function xmlParse(): void     {         $xml = new XMLReader();         if ($xml->open(Storage::path($this->fileName))) $this->readXml($xml);     }      private function readXml(XMLReader $xml): void     {         $serviceName = new $this->serviceName;         while ($xml->read() &amp;&amp; $xml->name !== $this->nodeName) ;         while ($xml->name === $this->nodeName) {             if ($xml->hasAttributes) {                 $node = (array)simplexml_load_string($xml->readOuterXml());                 $node = $node['@attributes'];                 $serviceName->addLine($node);             }             $xml->next($this->nodeName);         }         $this->deleteProcessedFile();     }      private function deleteProcessedFile(): void     {         Storage::delete($this->fileName);     }  } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432 \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e $timeout \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d \u0441\u0430\u043c\u044b\u0439 \u00ab\u0442\u044f\u0436\u0451\u043b\u044b\u0439\u00bb \u0444\u0430\u0439\u043b. \u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u044b. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f PostgreSQL \u043d\u0430 SDD \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 13 \u043c\u0438\u043d\u0443\u0442, \u0434\u043b\u044f MariaDB \u043d\u0430 HDD \u2014 \u043f\u043e\u0447\u0442\u0438 \u0434\u0432\u0430 \u0447\u0430\u0441\u0430.<\/p>\n<p><strong>\u0412\u0430\u0436\u043d\u043e!<\/strong> \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>retry_after<\/strong> \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u043e\u0447\u0435\u0440\u0435\u0434\u044c\u044e \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <strong>config\/queue.php<\/strong>. \u0415\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0442\u0430\u0439\u043c\u0430\u0443\u0442. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d <a href=\"https:\/\/laravel.com\/docs\/10.x\/queues#timeout\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0437\u0430\u0434\u0430\u043d\u0438\u044f<\/a>, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u043e \u0435\u0449\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0412 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 xml \u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u0437\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0411\u0414. \u041e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443 \u0438\u0434\u0451\u0442 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0435 49 (<abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;$serviceName->addLine()&#187;>$serviceName->addLine()<\/abbr>). \u041e\u0431 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c.<\/p>\n<p><a class=\"anchor\" name=\"common_gar\" id=\"common_gar\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f\u00a0\u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0411\u0414<\/h2>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u0430 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0438\u043c\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u0441\u043e\u0441\u0442\u0430\u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043e\u0431\u0449\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443. \u0412 \u043f\u0430\u043f\u043a\u0435 Services \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0430\u043f\u043a\u0443 Gar, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b CommonGar.php<\/p>\n<details class=\"spoiler\">\n<summary>C\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 CommonGar<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services\\Gar;  use Illuminate\\Support\\Facades\\DB; use Log;  abstract class CommonGar {     private array $insertArray;     private int $maxLineToSave;     private int $alreadySave;      public function __construct()     {         DB::table($this->getTableName())->truncate();         if (config('gar.log_level') > 0) Log::info('\u0422\u0430\u0431\u043b\u0438\u0446\u0430 ' . $this->getTableName() . ' \u043e\u0447\u0438\u0449\u0435\u043d\u0430');         $this->maxLineToSave = floor(65535 \/ count($this->getKeysArray()));         $this->alreadySave = 0;     }      public function __destruct()     {         if (isset($this->insertArray) and count($this->insertArray) > 0) $this->saveToTable();         if (config('gar.log_level') > 0) Log::info('\u0412\u0441\u0435\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 ' . $this->getTableName() . ' ' . $this->alreadySave);     }      abstract protected function getTableName(): string;      abstract protected function canProcessed(array $inputArray): bool;      abstract protected function getKeysArray(): array;      private function mapInputValues(array $inputValues): array     {         $keysArray = $this->getKeysArray();         $output = [];         foreach ($keysArray as $key => $newKey) {             if (key_exists($key, $inputValues)) {                 $newValue = match ($inputValues[$key]) {                     'true' => true,                     'false' => false,                     default => $inputValues[$key]                 };             } else $newValue = null;             $output[$newKey] = $newValue;         }         return $output;     }      private function clearInsertArray(): void     {         $this->insertArray = [];     }      private function saveToTable(): void     {         DB::table($this->getTableName())->insert($this->insertArray);         $this->alreadySave += count($this->insertArray);         if (config('gar.log_level') > 1) Log::info('\u0417\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 ' . $this->getTableName() . ' ' . count($this->insertArray) . ' \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0432\u0441\u0435\u0433\u043e: ' . $this->alreadySave);     }      private function processSave(): void     {         $this->saveToTable();         $this->clearInsertArray();     }      public function addLine(array $inputArray): void     {         if ($this->canProcessed($inputArray)) $this->insertArray[] = $this->mapInputValues($inputArray);         if (count($this->insertArray) >= $this->maxLineToSave) $this->processSave();     }  } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u043c\u0435\u0442\u043e\u0434 insert \u0444\u0430\u0441\u0430\u0434\u0430 DB:<\/p>\n<pre><code class=\"php\">DB::table($tableName)->insert($insertArray);<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0441\u0430\u0434 DB, \u0442.\u043a. \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u041c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043a\u043e\u0443\u043f\u044b (<a href=\"https:\/\/laravel.com\/docs\/10.x\/eloquent#global-scopes\" rel=\"noopener noreferrer nofollow\">Global Scopes)<\/a> \u0438 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0447\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443. \u041d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0451\u043c\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0441\u044f \u044d\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u043b\u0438\u0448\u043d\u0438\u0435 \u043c\u0438\u043d\u0443\u0442\u044b. \u0410 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0444\u0430\u0441\u0430\u0434\u0443 DB \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 PDO.<\/p>\n<p>\u041d\u043e \u043c\u0430\u0441\u0441\u043e\u0432\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 PDO \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c 65535. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u2014 \u044d\u0442\u043e \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438. \u0412\u0441\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u2014 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439  \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/p>\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;private int $maxLineToSave;&#187;>$maxLineToSave;<\/abbr> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0414\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    public function __construct()     {         DB::table($this->getTableName())->truncate();         if (config('gar.log_level') > 0) Log::info('\u0422\u0430\u0431\u043b\u0438\u0446\u0430 ' . $this->getTableName() . ' \u043e\u0447\u0438\u0449\u0435\u043d\u0430');         $this->maxLineToSave = floor(65535 \/ count($this->getKeysArray()));         $this->alreadySave = 0;     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043d\u043e\u0435 \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f 65535 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043e\u043a\u0440\u0443\u0433\u043b\u0451\u043d\u043d\u043e\u0435 \u0432 \u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443.<\/p>\n<p>\u041a\u043b\u0430\u0441\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043f\u043e\u0442\u043e\u043c\u043a\u0430\u0445<\/p>\n<pre><code class=\"php\">    abstract protected function getTableName(): string;      abstract protected function canProcessed(array $inputArray): bool;      abstract protected function getKeysArray(): array;<\/code><\/pre>\n<p><abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;function getTableName()&#187;>function getTableName()<\/abbr> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0441 \u043d\u0435\u044e (\u043e\u0447\u0438\u0441\u0442\u043a\u0430, \u0432\u0441\u0442\u0430\u0432\u043a\u0430)<\/p>\n<p><abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;function canProcessed()&#187;>function canProcessed()<\/abbr> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0441\u0442\u0438\u043d\u0443, \u0435\u0441\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0431\u0440\u043e\u0448\u0435\u043d. \u0422\u0430\u043a, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0435 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>param_types<\/strong> \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430<\/p>\n<details class=\"spoiler\">\n<summary>\u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    protected function canProcessed(array $inputArray): bool     {         return !(array_key_exists('ISACTIVE', $inputArray) and !$inputArray['ISACTIVE']);     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0410 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>house_params<\/strong><\/p>\n<details class=\"spoiler\">\n<summary>\u0442\u0430\u043a:<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    protected function canProcessed(array $inputArray): bool     {         return (array_key_exists('TYPEID', $inputArray) and $inputArray['TYPEID'] == 5);     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 <strong>house_params<\/strong> \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u0430 \u043e\u043d \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u0441 type_id = 5. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>\u041a\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u043c\u044b \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043c\u0435\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043d\u043e \u043d\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0441 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f\u043c\u0438 Laravel. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;mapInputValues()&#187;>mapInputValues()<\/abbr> \u0438 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;function getKeysArray()&#187;>getKeysArray()<\/abbr>.<\/p>\n<p><abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;function getKeysArray()&#187;>getKeysArray()<\/abbr> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043b\u044e\u0447\u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0441 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 XML, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043b\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b param_types<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">protected function getKeysArray(): array     {         return [             'ID' => 'id',             'NAME' => 'name',             'DESC' => 'desc',             'CODE' => 'code',             'ISACTIVE' => 'is_active',             'UPDATEDATE' => 'update_date',             'STARTDATE' => 'start_date',             'ENDDATE' => 'end_date',         ];     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u043e\u043a, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u043a \u0435\u0434\u0438\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0421\u043c. \u043a\u043e\u0434 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f  <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;function mapInputValues()&#187;>mapInputValues()<\/abbr>  \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438\u0437 xml \u0444\u0430\u0439\u043b\u0430. \u041e\u0431\u0445\u043e\u0434\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043a\u043b\u044e\u0447\u0435\u0439, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;getKeysArray()&#187;>getKeysArray()<\/abbr>.  \u0415\u0441\u043b\u0438 \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u044e\u0447 \u043d\u0430\u0439\u0434\u0435\u043d, \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0441 \u043d\u043e\u0432\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c \u0438 \u0441\u0442\u0430\u0440\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u0415\u0441\u043b\u0438 \u043a\u043b\u044e\u0447 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430 \u2014 \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447 => null. \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0438 &#8216;true&#8217; \u0438 &#8216;false&#8217; \u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f true \u0438 false. \u041f\u0440\u0438\u0447\u0451\u043c \u0442\u0430\u043a\u0430\u044f \u043f\u043e\u0434\u043c\u0435\u043d\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 MariaDB. PostgreSQL \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0438 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>function mapInputValues()<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    private function mapInputValues(array $inputValues): array     {         $keysArray = $this->getKeysArray();         $output = [];         foreach ($keysArray as $key => $newKey) {             if (key_exists($key, $inputValues)) {                 $newValue = match ($inputValues[$key]) {                     'true' => true,                     'false' => false,                     default => $inputValues[$key]                 };             } else $newValue = null;             $output[$newKey] = $newValue;         }         return $output;     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u2014 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;function addLine(array $inputArray): void&#187;>function addLine()<\/abbr>. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0431\u0443\u0444\u0435\u0440, \u0438 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>function addLine()<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    public function addLine(array $inputArray): void     {         if ($this->canProcessed($inputArray)) $this->insertArray[] = $this->mapInputValues($inputArray);         if (count($this->insertArray) >= $this->maxLineToSave) $this->processSave();     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0434\u0451\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0431\u0443\u0444\u0435\u0440\u0430, \u0438 \u0435\u0441\u043b\u0438 \u0432 \u043d\u0451\u043c \u0435\u0449\u0451 \u0447\u0442\u043e-\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c, \u043e\u043d \u0442\u0430\u043a\u0436\u0435 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0437\u0430\u043e\u0441\u0442\u0440\u044f\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443.<\/p>\n<p>\u0418\u043c\u0435\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446<\/p>\n<p><a class=\"anchor\" name=\"inherited_classes\" id=\"inherited_classes\"><\/a><\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h2>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/summary>\n<div class=\"spoiler__content\">\n<details class=\"spoiler\">\n<summary>Services\/Gar\/AddrObj.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services\\Gar;  class AddrObj extends CommonGar {     protected function getTableName(): string     {         return 'gar.addr_objs';     }      protected function canProcessed(array $inputArray): bool     {         return true;     }      protected function getKeysArray(): array     {         return [             'ID' => 'id',             'OBJECTID' => 'object_id',             'OBJECTGUID' => 'object_guid',             'CHANGEID' => 'change_id',             'NAME' => 'name',             'TYPENAME' => 'type_name',             'LEVEL' => 'level',             'OPERTYPEID' => 'oper_type_id',             'PREVID' => 'prev_id',             'NEXTID' => 'next_id',             'UPDATEDATE' => 'update_date',             'STARTDATE' => 'start_date',             'ENDDATE' => 'end_date',             'ISACTUAL' => 'is_actual',             'ISACTIVE' => 'is_active',         ];     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Services\/Gar\/AdmHierarchy.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services\\Gar;  class AdmHierarchy extends CommonGar {     protected function getTableName(): string     {         return 'gar.adm_hierarchies';     }      protected function canProcessed(array $inputArray): bool     {         return true;     }      protected function getKeysArray(): array     {         return [             'ID' => 'id',             'OBJECTID' => 'object_id',             'PARENTOBJID' => 'parent_obj_id',             'CHANGEID' => 'change_id',             'REGIONCODE' => 'region_code',             'AREACODE' => 'area_code',             'CITYCODE' => 'city_code',             'PLACECODE' => 'place_code',             'PLANCODE' => 'plan_code',             'STREETCODE' => 'street_code',             'PREVID' => 'prev_id',             'NEXTID' => 'next_id',             'UPDATEDATE' => 'update_date',             'STARTDATE' => 'start_date',             'ENDDATE' => 'end_date',             'ISACTIVE' => 'is_active',             'PATH' => 'path',         ];     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Services\/Gar\/House.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services\\Gar;  class House extends CommonGar {      protected function getTableName(): string     {         return 'gar.houses';     }      protected function canProcessed(array $inputArray): bool     {         return true;     }      protected function getKeysArray(): array     {         return [             'ID' => 'id',             'OBJECTID' => 'object_id',             'OBJECTGUID' => 'object_guid',             'CHANGEID' => 'change_id',             'HOUSENUM' => 'house_num',             'ADDNUM1' => 'add_num_1',             'ADDNUM2' => 'add_num_2',             'HOUSETYPE' => 'house_type',             'ADDTYPE1' => 'add_type_1',             'ADDTYPE2' => 'add_type_2',             'OPERTYPEID' => 'oper_type_id',             'PREVID' => 'prev_id',             'NEXTID' => 'next_id',             'UPDATEDATE' => 'update_date',             'STARTDATE' => 'start_date',             'ENDDATE' => 'end_date',             'ISACTUAL' => 'is_actual',             'ISACTIVE' => 'is_active',         ];     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Services\/Gar\/HouseAddType.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services\\Gar;  class HouseAddType extends CommonGar {      protected function getTableName(): string     {         return 'gar.house_add_types';     }      protected function canProcessed(array $inputArray): bool     {         return true;     }      protected function getKeysArray(): array     {         return [             'ID' => 'id',             'NAME' => 'name',             'SHORTNAME' => 'short_name',             'DESC' => 'desc',             'UPDATEDATE' => 'update_date',             'STARTDATE' => 'start_date',             'ENDDATE' => 'end_date',             'ISACTIVE' => 'is_active',         ];     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Services\/Gar\/HouseParam.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services\\Gar;  class HouseParam extends CommonGar {     protected function getTableName(): string     {         return 'gar.house_params';     }      protected function canProcessed(array $inputArray): bool     {         return true;     }      protected function getKeysArray(): array     {         return [             'ID' => 'id',             'OBJECTID' => 'object_id',             'CHANGEID' => 'change_id',             'CHANGEIDEND' => 'change_id_end',             'UPDATEDATE' => 'update_date',             'STARTDATE' => 'start_date',             'TYPEID' => 'type_id',             'VALUE' => 'value',             'ENDDATE' => 'end_date',         ];     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Services\/Gar\/HouseType.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services\\Gar;  class HouseType extends CommonGar {      protected function getTableName(): string     {         return 'gar.house_types';     }      protected function canProcessed(array $inputArray): bool     {         return true;     }      protected function getKeysArray(): array     {         return [             'ID' => 'id',             'NAME' => 'name',             'SHORTNAME' => 'short_name',             'DESC' => 'desc',             'UPDATEDATE' => 'update_date',             'STARTDATE' => 'start_date',             'ENDDATE' => 'end_date',             'ISACTIVE' => 'is_active',         ];     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Services\/Gar\/ObjectLevel.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services\\Gar;  class ObjectLevel extends CommonGar {      protected function getTableName(): string     {         return 'gar.object_levels';     }      protected function canProcessed(array $inputArray): bool     {         return true;     }      protected function getKeysArray(): array     {         return [             'LEVEL' => 'id',             'NAME' => 'name',             'SHORTNAME' => 'short_name',             'UPDATEDATE' => 'update_date',             'STARTDATE' => 'start_date',             'ENDDATE' => 'end_date',             'ISACTIVE' => 'is_active',         ];     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Services\/Gar\/ParamType.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Services\\Gar;  class ParamType extends CommonGar {      protected function getTableName(): string     {         return 'gar.param_types';     }      protected function canProcessed(array $inputArray): bool     {         return !(array_key_exists('ISACTIVE', $inputArray) and !$inputArray['ISACTIVE']);     }      protected function getKeysArray(): array     {         return [             'ID' => 'id',             'NAME' => 'name',             'DESC' => 'desc',             'CODE' => 'code',             'ISACTIVE' => 'is_active',             'UPDATEDATE' => 'update_date',             'STARTDATE' => 'start_date',             'ENDDATE' => 'end_date',         ];     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"insert_job\" id=\"insert_job\"><\/a><\/p>\n<h2>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/h2>\n<p>\u0412\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0415\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0438 \u043a\u043b\u0430\u0441\u0441\u044b, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;Services\/GarService.php&#187;>Services\/GarService.php<\/abbr> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430<\/p>\n<details class=\"spoiler\">\n<summary>function setImportJobs()<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    public static function setImportJobs(): void     {         \/\/ HouseParam         self::setJob('AS_HOUSES_PARAMS', 'PARAM', Gar\\HouseParam::class);          \/\/ AdmHierarchy         self::setJob('AS_ADM_HIERARCHY', 'ITEM', Gar\\AdmHierarchy::class);          \/\/ House         self::setJob('AS_HOUSES', 'HOUSE', Gar\\House::class);          \/\/ AddrObj         self::setJob('AS_ADDR_OBJ', 'OBJECT', Gar\\AddrObj::class);          \/\/ ParamType         self::setJob('AS_PARAM_TYPES', 'PARAMTYPE', Gar\\ParamType::class);          \/\/ObjectLevels         self::setJob('AS_OBJECT_LEVELS', 'OBJECTLEVEL', Gar\\ObjectLevel::class);          \/\/ HouseTypes         self::setJob('AS_HOUSE_TYPES', 'HOUSETYPE', Gar\\HouseType::class);          \/\/ HouseAddTypes         self::setJob('AS_ADDHOUSE_TYPES', 'HOUSETYPE', Gar\\HouseAddType::class);     } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0421\u0430\u043c\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;setJob()&#187;>setJob()<\/abbr>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u043b\u044e\u0447 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;$regFileNames&#187;>$regFileNames<\/abbr>, \u0438\u043c\u044f XML \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0442 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;CommonGar&#187;>CommonGar<\/abbr>. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043e\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u00ab\u0442\u044f\u0436\u0451\u043b\u043e\u0433\u043e\u00bb \u0444\u0430\u0439\u043b\u0430 \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u00ab\u043b\u0451\u0433\u043a\u043e\u043c\u0443\u00bb. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u0430\u0437\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>function setJob()<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    private static function setJob(string $keyFileName, string $nodeName, string $serviceName): void     {         $fileName = self::getFileName(self::$regFileNames[$keyFileName]);         if (Storage::fileExists($fileName)) ImportGar::dispatch($fileName, $nodeName, $serviceName);     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p><abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;setJob()&#187;>setJob()<\/abbr> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;getFileName()&#187;>getFileName()<\/abbr> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438 \u0432\u044b\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;$regFileNames&#187;>$regFileNames<\/abbr>.<\/p>\n<details class=\"spoiler\">\n<summary>function getFileName()<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    private static function getFileName(string $filePattern): string     {         $files = Storage::files(config('gar.unzip_full_path'), true);         foreach ($files as $file) {             if (preg_match($filePattern, basename($file))) return $file;         }         return '';     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u0432\u043e\u0451 \u0432\u0440\u0435\u043c\u044f \u043c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u0441\u0451 \u0434\u0435\u0440\u0435\u0432\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u0438 \u043d\u0430\u0439\u0442\u0438 \u0438\u0441\u043a\u043e\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0421 Laravel \u0432\u0441\u0451 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0449\u0435. \u041c\u0435\u0442\u043e\u0434 \u0444\u0430\u0441\u0430\u0434\u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;Storage::files()&#187;>Storage::files()<\/abbr> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043b\u043e\u0441\u043a\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 \u0434\u0435\u0440\u0435\u0432\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432. \u041e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0438\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c.<\/p>\n<p>\u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u0432\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/p>\n<pre><code class=\"bash\">php artisan make:command GarFullImportCommand<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 Console\/Commands\/GarFullImportCommand.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Console\\Commands;  use App\\Services\\GarService; use Exception; use Illuminate\\Console\\Command;  class GarFullImportCommand extends Command {     protected $signature = 'gar:full-import';      protected $description = 'Command import full download from GAR';      \/**      * @throws Exception      *\/     public function handle(): void     {         GarService::setImportJobs();     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code class=\"bash\">php artisan gar:full-import<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/507\/bc2\/72b\/507bc272b55ee4d98dcf1637a7424a88.png\" width=\"1205\" height=\"285\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/507\/bc2\/72b\/507bc272b55ee4d98dcf1637a7424a88.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"queue_processing\" id=\"queue_processing\"><\/a><\/p>\n<h2>\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/h2>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u043e\u0440\u043a\u0435\u0440\u044b \u043d\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0438\u0445 \u0432 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435. \u041d\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0439\u0442\u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c, \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u043e\u0440\u043a\u0435\u0440\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p><a class=\"anchor\" name=\"loading_time\" id=\"loading_time\"><\/a><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b, \u043a\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043d\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0439, \u0438 \u043a\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c. <\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f <\/summary>\n<div class=\"spoiler__content\">\n<p>\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435. \u0421\u0423\u0411\u0414 PostgreSQL \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043d\u0430 \u0445\u043e\u0441\u0442-\u043c\u0430\u0448\u0438\u043d\u0443 \u0432 \u0432\u0438\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c.<\/p>\n<p>MariaDB \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 Docker. <\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 Docker<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">docker run --name mariadb -p 127.0.0.1:3306:3306 \\ -v e:\\dev\\mariadb\\data:\/var\/lib\/mysql \\ -v e:\\dev\\mariadb\\logs:\/var\/lib\/mysql\/logs \\ -v e:\\dev\\mariadb\\etc:\/etc\/mysql\/conf.d \\ -e MYSQL_ROOT_PASSWORD=secret -it  mariadb:10.4<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f PostgreSQL \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b PostgreSQL<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c01\/15a\/e6d\/c0115ae6d8301b8b80245c9a8a531f9b.png\" width=\"939\" height=\"259\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c01\/15a\/e6d\/c0115ae6d8301b8b80245c9a8a531f9b.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0434\u0435\u0441\u044c \u0443 \u043c\u0435\u043d\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043e\u0442 \u043b\u0451\u0433\u043a\u043e\u0433\u043e \u043a \u0442\u044f\u0436\u0451\u043b\u043e\u043c\u0443. \u0421\u0430\u043c\u043e\u0435 \u0442\u044f\u0436\u0451\u043b\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f 12,5 \u043c\u0438\u043d\u0443\u0442. \u041a\u0430\u043a \u0438 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e, \u044f \u043f\u0440\u043e\u0432\u0451\u043b \u0437\u0430\u043c\u0435\u0440\u044b \u0442\u0440\u0438\u0436\u0434\u044b, \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u043f\u0440\u0435\u0434\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u043c\u0443.<\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f MariaDB<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b MariaDB<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7fb\/56f\/c31\/7fb56fc31e363b934be293e9aad23520.png\" width=\"887\" height=\"257\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7fb\/56f\/c31\/7fb56fc31e363b934be293e9aad23520.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0442\u0430\u043a \u0438 \u0431\u044b\u043b\u043e, \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0437\u0430\u043d\u044f\u043b\u043e \u0441\u0432\u044b\u0448\u0435 \u0434\u0432\u0443\u0445 \u0447\u0430\u0441\u043e\u0432.<\/p>\n<p>\u0422\u0430\u043a\u043e\u0435 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 PostgreSQL \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430 SSD, \u0430 \u0443 MariaDB \u043d\u0430 HDD.<\/p>\n<p>\u0420\u0430\u0441\u0447\u0438\u0441\u0442\u0438\u0432 \u043c\u0435\u0441\u0442\u043e \u043d\u0430 SSD \u044f \u043f\u0435\u0440\u0435\u043d\u0451\u0441 \u0434\u0430\u043d\u043d\u044b\u0435 MariaDB \u043d\u0430 SSD. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0439<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0435 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f MariaDB<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/124\/4dd\/126\/1244dd12639c9fc317247f9deb1ed5c1.png\" width=\"947\" height=\"254\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/124\/4dd\/126\/1244dd12639c9fc317247f9deb1ed5c1.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0423\u0436\u0435 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0443\u0447\u0448\u0435, \u0445\u043e\u0442\u044f \u0438 \u043d\u0435 \u0434\u043e\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u0434\u043e PostgreSQL. \u041d\u043e \u0437\u0434\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0435\u0441\u0442\u044c \u043d\u0435\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u044f \u043f\u0440\u043e\u0432\u0451\u043b \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0435\u043c\u0443: \u0434\u0430\u0441\u0442 \u043b\u0438 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430, \u0438 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u044d\u0442\u043e\u0442 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u0435\u043d. \u0412\u0434\u0440\u0443\u0433 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a, \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0437\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439, \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0432\u0435\u0434\u044c \u043f\u0440\u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0421\u0423\u0411\u0414 \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0431\u043b\u0438\u0446 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u043e\u0434\u043d\u043e. \u041f\u0440\u0430\u0432\u0434\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0434\u0451\u0442 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0431\u0443\u0444\u0435\u0440\u044b, \u0437\u0430\u0442\u0435\u043c \u043e\u043d\u0438 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. <\/p>\n<p>\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u043e, \u0447\u0442\u043e \u0434\u0430 \u2014 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0434\u0430\u0451\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0440\u0435\u043c\u044f \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043b\u043e \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0442\u044f\u0436\u0451\u043b\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f MariaDB \u043d\u0430 SSD \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0442\u044f\u0436\u0451\u043b\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043d\u044f\u043b\u043e 20 \u043c\u0438\u043d\u0443\u0442, \u0430 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u043d\u044f\u043b\u0430 23 \u043c\u0438\u043d\u0443\u0442\u044b, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043a\u0430\u043a \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u043d\u044f\u043b\u0430 \u0431\u044b 37 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p>\u041d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u0435\u043d \u0438 \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u0438\u0434\u0451\u0442 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u2014 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0435. \u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u0441\u0451 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0434\u0438\u0441\u043a\u0435, \u0430 \u0434\u0438\u0441\u043a \u044d\u0442\u043e\u0442 \u0431\u044b\u043b \u0431\u044b HDD, \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c.<\/p>\n<\/p>\n<\/div>\n<\/details>\n<p>\u042d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c \u044f \u043f\u0440\u0438\u0448\u0451\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e 2-\u0445 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432. \u0421\u0430\u043c\u043e\u0435 \u0442\u044f\u0436\u0451\u043b\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435. \u041d\u043e \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0430 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u0438\u043d \u0432\u043e\u0440\u043a\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043e\u0434\u043d\u043e \u0442\u044f\u0436\u0451\u043b\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435, \u043d\u043e \u0443\u0441\u043f\u0435\u043b \u043f\u0440\u0438\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0435 \u0442\u044f\u0436\u0451\u043b\u043e\u0435, \u043f\u043e\u043a\u0430 \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0432\u043e\u0440\u043a\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u043b\u0451\u0433\u043a\u0438\u0435. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0438\u0432\u0435\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0432\u044b\u0448\u0435 \u0434\u0432\u0443\u0445 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432. <\/p>\n<p>\u0414\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;config\/gar.php&#187;>config\/gar.php<\/abbr><\/p>\n<pre><code class=\"php\">    \/\/ \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432, \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0439     'num_workers' => 4,<\/code><\/pre>\n<p>\u0412\u043e\u0440\u043a\u0435\u0440\u044b \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code class=\"bash\">php artisan make:command GarStartWorkersCommand<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 Console\/Commands\/GarStartWorkersCommand.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Console\\Commands;  use Illuminate\\Console\\Command; use Illuminate\\Process\\Pool; use Illuminate\\Support\\Facades\\Process;  class GarStartWorkersCommand extends Command {     protected $signature = 'gar:start-workers';      protected $description = 'Command description';      public function handle(): void     {         Process::pool(function (Pool $pool) {             for ($i = 0; $i &lt; config('gar.num_workers'); $i++) {                 $pool->path(base_path())->timeout(3600)->command('php artisan queue:work --stop-when-empty');             }         })->start()->wait();     } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0427\u0442\u043e \u0432 \u043d\u0435\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0443\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0432\u044b\u0437\u043e\u0432\u043e\u043c <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;Process::pool()&#187;>Process::pool()<\/abbr>. \u0412 \u043c\u0435\u0442\u043e\u0434 pool \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438). \u0422.\u043a. \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0446\u0438\u043a\u043b. \u041c\u0435\u0442\u043e\u0434 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;path&#187;>path<\/abbr> \u0437\u0430\u0434\u0430\u0451\u0442 \u043f\u0443\u0442\u044c \u043a \u0440\u0430\u0431\u043e\u0447\u0435\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443,  <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;timeout&#187;>timeout<\/abbr> \u0437\u0430\u0434\u0430\u0451\u0442 \u0432\u0440\u0435\u043c\u044f \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430, \u0430 \u043c\u0435\u0442\u043e\u0434 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;command&#187;>command<\/abbr> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>\u0412\u043e\u0440\u043a\u0435\u0440\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;&#8212;stop-when-empty&#187;>&#8212;stop-when-empty<\/abbr>, \u0447\u0442\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0435\u0441\u043b\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0441\u0442\u0430.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code>php artisan gar:start-workers<\/code><\/pre>\n<p>\u0438 \u0438\u0434\u0451\u043c \u043f\u0438\u0442\u044c \u0447\u0430\u0439.<\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e, \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u0435\u0436\u0430\u0442 \u043f\u043e \u0441\u0432\u043e\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c. <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e, \u0440\u0430\u0434\u0438 \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0438 \u0437\u0430\u0442\u0435\u0432\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p><a class=\"anchor\" name=\"create_view\" id=\"create_view\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f (VIEW) \u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0432\u0441\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c, \u0441\u0432\u0435\u0434\u0451\u043c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code class=\"bash\">php artisan make:migration create_gar_data_by_uuid_view<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration;  return new class extends Migration {     public function up(): void     {         $sql = \" drop view if exists gar.gar_data_by_uuid;  create view gar.gar_data_by_uuid as SELECT COALESCE(hp.value, '\u041d\u0435 \u0437\u0430\u0434\u0430\u043d') AS post_index,        ao1.object_id                  AS city_object_id,        ao1.object_guid                AS city_object_guid,        ao1.type_name                  AS city_type_name,        ao1.name                       AS city_name,        ol1.short_name                 AS city_level_short_name,        ol1.name                       AS city_level_name,        ao.object_id                   AS street_object_id,        ao.object_guid                 AS street_object_guid,        ao.type_name                   AS street_type_name,        ao.name                        AS street_name,        ol.name                        AS street_level_name,        ol.short_name                  AS street_level_short_name,        h.object_id                    AS house_object_id,        h.object_guid                  AS house_object_guid,        ht.name                        AS house_type_name,        ht.short_name                  AS house_type_short_name,        h.house_num,        hat.short_name                 AS house_add_type_1_short_name,        hat.name                       AS house_add_type_1_name,        h.add_num_1                    AS house_add_num_1,        hat1.short_name                AS house_add_type_2_short_name,        hat1.name                      AS house_add_type_2_name,        h.add_num_2                    AS house_add_num_2,        h.is_active                    AS house_active FROM gar.houses h          LEFT JOIN gar.adm_hierarchies ah ON ah.object_id = h.object_id AND ah.is_active = true          LEFT JOIN gar.adm_hierarchies ah1 ON ah1.object_id = ah.parent_obj_id AND ah1.is_active = true          LEFT JOIN gar.addr_objs ao ON ao.object_id = ah.parent_obj_id AND ao.is_active = true          LEFT JOIN gar.addr_objs ao1 ON ao1.object_id = ah1.parent_obj_id AND ao1.is_active = true          LEFT JOIN gar.house_types ht ON ht.id = h.house_type AND ht.is_active = true          LEFT JOIN gar.house_add_types hat ON hat.id = h.add_type_1 AND hat.is_active = true          LEFT JOIN gar.house_add_types hat1 ON hat1.id = h.add_type_2 AND hat1.is_active = true          LEFT JOIN gar.object_levels ol ON ol.id = ao.level AND ol.is_active = true          LEFT JOIN gar.object_levels ol1 ON ol1.id = ao1.level AND ol1.is_active = true          LEFT JOIN gar.house_params hp ON hp.object_id = h.object_id AND hp.type_id = 5 AND hp.end_date >= now() WHERE h.is_actual = true\";         DB::unprepared($sql);     }      public function down(): void     {         DB::unprepared('drop view if exists gar.gar_data_by_uuid;');     } };<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\GarDataByUUID<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Models\\Gar;  use Illuminate\\Database\\Eloquent\\Model;  class GarDataByUUID extends Model {     public $timestamps = false;     protected $table = 'gar.gar_data_by_uuid'; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e<\/p>\n<pre><code>php artisan migrate<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e. \u041c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e, \u043a\u0430\u043a \u043a \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445, \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u0445 (join). \u0410 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e, \u043a\u0430\u043a \u043a \u043c\u043e\u0434\u0435\u043b\u0438 Laravel.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"php\">$result = GarDataByUUID::where('house_object_guid', '=',   '5cef293c-745f-4053-bed6-05466f2758f4')   ->first();  dump($result->attributesToArray());<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/69b\/384\/6cc\/69b3846cc120db8aa106df749552c13f.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430\" width=\"533\" height=\"386\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/69b\/384\/6cc\/69b3846cc120db8aa106df749552c13f.png\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e: \u0438\u043d\u0434\u0435\u043a\u0441, \u0433\u043e\u0440\u043e\u0434, \u0443\u043b\u0438\u0446\u0443, \u0434\u043e\u043c. \u041d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 select.<\/p>\n<p><a class=\"anchor\" name=\"actualization\" id=\"actualization\"><\/a><\/p>\n<h2>\u00ab\u0410\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u00bb \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u041d\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043c\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438. \u0422\u0430\u043a\u043e\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u044e\u0440. \u043b\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 \u0434\u043e\u043c\u0430, \u043d\u0435 \u043e\u0437\u0430\u0431\u043e\u0447\u0435\u043d\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0434\u043e\u043c\u0430\u043c\u0438 \u043d\u0443\u0436\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0445 &#171;\u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c&#187;. <\/p>\n<p><strong>\u041a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0434\u043e\u043c\u0435 \u043d\u0435\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430?<\/strong><\/p>\n<p>\u041f\u043e\u043b\u0435 <strong>house_active<\/strong> \u0440\u0430\u0432\u043d\u043e false, \u0430 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f, \u043a\u0440\u043e\u043c\u0435, <strong>house_object_id<\/strong> \u0438 <strong>house_object_guid<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 <strong>null<\/strong>. <\/p>\n<p><strong>\u041a\u0430\u043a \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0434\u043e\u043c\u0435?<\/strong><\/p>\n<p>\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b <a href=\"https:\/\/habr.com\/ru\/articles\/763828#actualization\" rel=\"noopener noreferrer nofollow\">\u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>. \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;GarService&#187;>GarService<\/abbr> \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;activateHouse&#187;>activateHouse<\/abbr><\/p>\n<details class=\"spoiler\">\n<summary>GarService::activateHouse<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">    public static function activateHouse(string $guid): void     {         $house = House::where('object_guid', '=', $guid)             ->orderBy('end_date', 'desc')             ->limit(1)             ->get()[0];         $house->update(['is_active' => 'true', 'is_actual' => 'true']);         $adm_hierarchy = AdmHierarchy::where('object_id', '=', $house->object_id)             ->orderBy('end_date', 'desc')             ->limit(1)             ->get()[0];         $adm_hierarchy->update(['is_active' => 'true']);     }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u00ab\u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00bb \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434. <\/p>\n<p><strong>\u0412\u0430\u0436\u043d\u043e!<\/strong> \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438. \u041f\u0440\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u0435\u043b\u044c\u0442 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u044f\u043c.<\/p>\n<p><a class=\"anchor\" name=\"together\" id=\"together\"><\/a><\/p>\n<h2>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435<\/h2>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0448\u0430\u0433\u0438: \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443, \u043f\u0430\u0440\u0441\u0438\u0442 \u0435\u0451, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u043e\u0440\u043a\u0435\u0440\u044b \u0438 \u0437\u0430\u043d\u043e\u0441\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<pre><code class=\"bash\">php artisan make:command GarCompleteFullUmportCommand<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Console\\Commands;  use App\\Services\\GarService; use Exception; use Illuminate\\Console\\Command;  class GarCompleteFullImportCommand extends Command {     protected $signature = 'gar:complete-full-import';      protected $description = 'Command performs full import to the database';      \/**      * @throws Exception      *\/     public function handle(): void     {         if (GarService::downloadFullGarArchive())             if (GarService::extractFullGar()) {                 GarService::setImportJobs();                 $this->call('gar:start-workers');             }     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043d\u0443\u0436\u0434\u0430, \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u0430\u0437\u044b \u0413\u0410\u0420 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<pre><code class=\"bash\">php artisan gar:complete-full-import<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0435 Laravel \u0438\u043b\u0438 \u0432 cron.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><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\/articles\/764392\/\"> https:\/\/habr.com\/ru\/articles\/764392\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0420\u0435\u0448\u0430\u0435\u043c\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>\u0417\u043d\u0430\u044f UUID \u0434\u043e\u043c\u0430 (\u0440\u0430\u043d\u0435\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0424\u0418\u0410\u0421) \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u0433\u043e\u0440\u043e\u0434, \u0443\u043b\u0438\u0446\u0443 \u0438 \u043d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430 \u0434\u043b\u044f <strong>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430<\/strong>, \u0438 \u043d\u0430 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0420\u0421\u0423\u0411\u0414 \u2014 PostgeSQL, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u2014 Laravel 10.<\/p>\n<h3>\u041a\u043e\u043c\u0443 \u0435\u0449\u0451 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b<\/h3>\n<p>\u0412\u0441\u0435\u043c, \u043a\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0445\u043e\u0436\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. \u0422\u0435\u043c, \u043a\u0442\u043e \u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u0442 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u0433\u043e, \u0442.\u0435. \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0432 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0432\u043e\u0438 \u0431\u0430\u0437\u044b, \u043d\u0430\u0445\u043e\u0434\u044f \u00ab\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0424\u0418\u0410\u0421\u00bb \u043f\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0433\u043e\u0440\u043e\u0434\u043e\u0432, \u0443\u043b\u0438\u0446 \u0438 \u0442.\u043f. \u0410 \u0442\u0430\u043a \u0436\u0435 \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0431\u0430\u0437\u044b \u0413\u0410\u0420, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0435\u0448\u0430\u0435\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<h2>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/h2>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/763828\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u0430\u0437\u044b \u0413\u0410\u0420<\/a> \u0441 \u0446\u0435\u043b\u044c\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0432\u043e\u044e \u0431\u0430\u0437\u0443<\/p>\n<h2>\u0427\u0442\u043e \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438?<\/h2>\n<p><a href=\"#prolog\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u043b\u043e\u0433<\/a><\/p>\n<p><a href=\"#app_only\" rel=\"noopener noreferrer nofollow\">\u0414\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445<\/a><\/p>\n<p><a href=\"#application_concept\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/p>\n<p><a href=\"#system_requirements\" rel=\"noopener noreferrer nofollow\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/a><\/p>\n<p><a href=\"#creating_application\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u043e\u0439\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a><\/p>\n<p><a href=\"#migrations\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439<\/a><\/p>\n<p><a href=\"#download_full_gar\" rel=\"noopener noreferrer nofollow\">\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0431\u0430\u0437\u044b \u0413\u0410\u0420<\/a><\/p>\n<p><a href=\"#extract_full_gar\" rel=\"noopener noreferrer nofollow\">\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430<\/a><\/p>\n<p><a href=\"#import_full_gar\" rel=\"noopener noreferrer nofollow\">\u041f\u0430\u0440\u0441\u0438\u043d\u0433 xml \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 (Job) \u043d\u0430 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/a><\/p>\n<p><a href=\"#common_gar\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f\u00a0\u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0411\u0414<\/a><\/p>\n<p><a href=\"#inherited_classes\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/a><\/p>\n<p><a href=\"#insert_job\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c<\/a><\/p>\n<p><a href=\"#queue_processing\" rel=\"noopener noreferrer nofollow\">\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0438<\/a><\/p>\n<p><a href=\"#create_view\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f (VIEW) \u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c<\/a><\/p>\n<p><a href=\"#actualization\" rel=\"noopener noreferrer nofollow\">\u00ab\u0410\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u00bb \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<p><a href=\"#together\" rel=\"noopener noreferrer nofollow\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435<\/a><\/p>\n<p><a class=\"anchor\" name=\"prolog\" id=\"prolog\"><\/a><\/p>\n<h2>\u041f\u0440\u043e\u043b\u043e\u0433<\/h2>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/763828\/\" rel=\"noopener noreferrer nofollow\">\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0431\u0430\u0437\u044b \u0413\u0410\u0420. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0445\u043e\u0442\u0435\u043b \u043a\u043e\u0440\u043e\u0442\u0435\u043d\u0435\u0447\u043a\u043e \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0443\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0432\u044b\u0448\u043b\u043e \u043a\u0430\u043a \u0432 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u0435\u0434\u0438\u0438: <a href=\"https:\/\/youtu.be\/HwZen0Z81Mg\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0440\u043e\u0442\u0435\u043d\u044c\u043a\u043e, \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 40<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0440\u0430\u0437\u0434\u0435\u043b \u0434\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u043d \u0443\u0431\u0440\u0430\u043d \u0432 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u044b. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u0421\u0423\u0411\u0414 PostgreSQL \u0438 MariaDB. \u0415\u0441\u043b\u0438 \u044f \u0447\u0442\u043e-\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0443\u043f\u0443\u0441\u0442\u0438\u043b, \u043f\u0438\u0448\u0438\u0442\u0435. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p><a class=\"anchor\" name=\"app_only\" id=\"app_only\"><\/a><\/p>\n<h2>\u0414\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445<\/h2>\n<details class=\"spoiler\">\n<summary>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 <a href=\"https:\/\/github.com\/IggorGor\/gar\" rel=\"noopener noreferrer nofollow\">github.com<\/a> \u0438\u043b\u0438 \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u043e\u043c<\/p>\n<pre><code class=\"bash\">git clone git@github.com:IggorGor\/gar.git<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438<\/p>\n<pre><code class=\"bash\">cd gar sudo chown -R $USER:www-data storage sudo chown -R $USER:www-data bootstrap\/cache chmod -R 775 storage chmod -R 775 bootstrap\/cache<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;.env&#187;>.env<\/abbr> \u0438 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;config\/gar.php&#187;>config\/gar.php<\/abbr> \u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u0431\u0430\u0437\u0430 \u043d\u0435 PostgreSQL, \u0438\u043c\u044f \u0431\u0430\u0437\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c <strong>gar<\/strong>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"#system_requirements\" rel=\"noopener noreferrer nofollow\">\u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439<\/a>. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043d\u043e\u043c\u0435\u0440 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/p>\n<pre><code class=\"bash\">composer install --no-dev --optimize-autoloader<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code class=\"bash\">php artisan migrate<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d wget (\u0435\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044f \u0438 \u0434\u043b\u044f Windows). \u0415\u0441\u043b\u0438 \u043f\u0443\u0442\u044c \u043a wget \u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0432 PATH, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0443\u0442\u0438\u043b\u0438\u0442\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;config\/gar.php&#187;>config\/gar.php<\/abbr>.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <\/p>\n<pre><code>php artisan gar:complete-full-import<\/code><\/pre>\n<p>\u0414\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c \u0435\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0412\u0440\u0435\u043c\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430.<\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&lt;p>&lt;\/p>&#187; data-abbr=&#187;gar.gar.gar_data_by_uuid&#187;>gar.gar_data_by_uuid<\/abbr> \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c<\/p>\n<pre><code class=\"sql\">select * from gar.gar_data_by_uuid where city_name = '\u041d\u043e\u0432\u043e-\u0422\u0430\u043b\u0438\u0446\u044b' and street_name = '5-\u044f \u0418\u0437\u0443\u043c\u0440\u0443\u0434\u043d\u0430\u044f'<\/code><\/pre>\n<p>\u0418\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043c\u043e\u0434\u0435\u043b\u044c\u044e <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;Models\\Gar\\GarDataByUUID&#187;>Models\\Gar\\GarDataByUUID<\/abbr><\/p>\n<pre><code class=\"php\">$result = GarDataByUUID::where('house_object_guid', '=',   '5cef293c-745f-4053-bed6-05466f2758f4')   ->first();<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0438\u043b\u0438 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u043d\u0438\u0437\u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b. \u041f\u043e\u0434\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0430\u0439\u043c\u0430\u0443\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432\u043e\u0440\u043a\u0435\u0440\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 (Job).  \u0423\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438\u0437 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 <a href=\"#loading_time\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/a>.<\/p>\n<details class=\"spoiler\">\n<summary>\u0412 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>gar:full-download<\/strong> \u2014 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<br \/><strong>gar:full-extract<\/strong> \u2014 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438<br \/><strong>gar:full-import <\/strong>\u2014 \u0441\u0442\u0430\u0432\u0438\u0442 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 xml \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0411\u0414<br \/><strong>gar:start-workers<\/strong> \u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 Laravel<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c <a href=\"#actualization\" rel=\"noopener noreferrer nofollow\">\u0441\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u00ab\u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00bb<\/a> \u043d\u0435\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"application_concept\" id=\"application_concept\"><\/a><\/p>\n<h2>\u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0435\u0435 web-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e PHP, wget \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u0431\u0430\u0437\u044b \u0413\u0410\u0420 \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0438\u043b\u0438 \u043f\u043e \u0432\u044b\u0437\u043e\u0432\u0443 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041f\u0430\u0440\u0441\u0438\u0442 \u0444\u0430\u0439\u043b\u044b, \u0432 \u043e\u0431\u044a\u0451\u043c\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u043c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 (<a href=\"https:\/\/habr.com\/ru\/articles\/763828\/\" rel=\"noopener noreferrer nofollow\">\u0441\u043c. \u0447\u0430\u0441\u0442\u044c I<\/a>) \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0438\u0445 \u0432 \u0431\u0430\u0437\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432 \u0438 \u0438\u0437 \u0437\u0430\u043f\u0443\u0441\u043a \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b pg_dump \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0430 production \u0441\u0435\u0440\u0432\u0435\u0440. \u0422\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 (\u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0435\u0433\u0438\u043e\u043d), \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 \u0434\u0432\u0443\u0445 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p><a class=\"anchor\" name=\"system_requirements\" id=\"system_requirements\"><\/a><\/p>\n<h2>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/www.php.net\/downloads\" rel=\"noopener noreferrer nofollow\">php<\/a> \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435 \u043d\u0438\u0436\u0435 8.1, \u0443\u0442\u0438\u043b\u0438\u0442\u0430 <abbr class=\"habraabbr\" title=\"\" data-title=\"&lt;p>&lt;\/p>&#187; data-abbr=&#187;wget&#187;>wget<\/abbr>, <a href=\"https:\/\/getcomposer.org\/\" rel=\"noopener noreferrer nofollow\">composer<\/a>, \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0420\u0421\u0423\u0411\u0414 <a href=\"https:\/\/www.postgresql.org\/download\/\" rel=\"noopener noreferrer nofollow\">PostgreSQL<\/a>.<\/p>\n<p><strong>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0421\u0423\u0411\u0414, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 Laravel?<\/strong><\/p>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PostgreSQL, \u043d\u043e \u0437\u0430\u0442\u0435\u043c, \u043f\u043e \u043f\u0440\u043e\u0441\u044c\u0431\u0430\u043c \u0442\u0440\u0443\u0434\u044f\u0449\u0438\u0445\u0441\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 MariaDB. \u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u0434\u0430, \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f PostgreSQL \u0438 MariaDB.<\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 PostgreSQL \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0442\u0435\u043c \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0432 \u0431\u044d\u043a\u0430\u043f, \u0438 \u044d\u0442\u043e\u0442 \u0431\u044d\u043a\u0430\u043f \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0434\u0435.<\/p>\n<p>\u0414\u043b\u044f MariaDB \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 (\u0441\u0445\u0435\u043c\u0430 \u0432 MariaDB \u044d\u0442\u043e \u0441\u0438\u043d\u043e\u043d\u0438\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0445\u0435\u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c \u0438\u0434\u0451\u0442 \u043a\u0430\u043a &#171;schema.table&#187;. \u0415\u0441\u043b\u0438 \u0438\u043c\u044f \u0441\u0445\u0435\u043c\u044b \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0411\u0414, \u0442\u043e \u0434\u043b\u044f MariaDB \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e.<\/p>\n<p><strong>\u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PHP \u043d\u0438\u0436\u0435 8.1?<\/strong><\/p>\n<p>\u041c\u043e\u0436\u043d\u043e, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0441\u0430\u0434\u0430 <strong>Illuminate\\Support\\Facades\\Process<\/strong>. \u0412\u043f\u0440\u043e\u0447\u0435\u043c \u0432\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0434\u043e\u0431\u0440\u043e\u0433\u043e exec(), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <strong>match()<\/strong>, \u0438 \u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 php \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u0436\u0435 \u0432\u043e\u0441\u044c\u043c\u0451\u0440\u043a\u0438.<\/p>\n<p><a class=\"anchor\" name=\"creating_application\" id=\"creating_application\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u043e\u0439\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">composer create-project laravel\/laravel gar<\/code><\/pre>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c<\/p>\n<pre><code class=\"bash\">cd gar<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430<\/p>\n<pre><code class=\"bash\">sudo chown -R $USER:www-data storage sudo chown -R $USER:www-data bootstrap\/cache chmod -R 775 storage chmod -R 775 bootstrap\/cache<\/code><\/pre>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/p>\n<pre><code class=\"bash\">rm .\/database\/migrations\/2014_10_12_000000_create_users_table.php rm .\/database\/migrations\/2014_10_12_100000_create_password_reset_tokens_table.php rm .\/database\/migrations\/2019_12_14_000001_create_personal_access_tokens_table.php rm .\/database\/factories\/UserFactory.php rm .\/app\/Models\/User.php rm .\/config\/sanctum.php<\/code><\/pre>\n<p>\u041e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435: \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0432 <strong>Laravel<\/strong> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <strong>sanctum<\/strong>, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>personal_access_tokens<\/strong>. \u041f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. <strong>sanctum<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <strong>vendor<\/strong>. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0443\u0434\u0430\u043b\u044f\u0435\u043c <strong>sanctum<\/strong><\/p>\n<pre><code>composer remove laravel\/sanctum<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443: \u00abClass &#171;Laravel\\Sanctum\\Sanctum&#187; not found\u00bb, \u0442.\u043a. \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u0443: \u00abuse Laravel\\Sanctum\\Sanctum;\u00bb<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 <strong>.env<\/strong>.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. <strong>\u0412\u0430\u0436\u043d\u043e! <\/strong>\u0415\u0441\u043b\u0438 \u0421\u0423\u0411\u0414 \u043e\u0442\u043b\u0438\u0447\u043d\u0430 \u043e\u0442 PostgreSQL \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0440\u043e\u0433\u043e \u00ab<strong>gar<\/strong>\u00bb. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b\u044b \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439, \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 <a href=\"#inherited_classes\" rel=\"noopener noreferrer nofollow\">\u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/a>.<\/p>\n<p><strong>QUEUE_CONNECTION<\/strong> \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u043e\u0442 <strong>sync<\/strong>, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u043e\u0438\u0442 <strong>database<\/strong>.<\/p>\n<p>\u041d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0437\u0430\u043f\u0438\u0441\u0430\u0432 \u0432 <strong>APP_DEBUG=false<\/strong>, \u0430 \u0432 <strong>APP_ENV=production<\/strong>.<\/p>\n<p>\u042d\u0442\u043e \u0440\u0435\u0448\u0438\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u0443\u0442\u0435\u0447\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0449\u0430\u0434\u043d\u043e \u0443\u0442\u0435\u043a\u0430\u043b\u0430 \u043f\u0430\u043c\u044f\u0442\u044c. \u0412\u043e\u043e\u0440\u0443\u0436\u0438\u0432\u0448\u0438\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <strong>memory_get_usage()<\/strong> \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043c\u043e\u0435\u0439 \u0432\u0438\u043d\u044b \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442. \u041f\u0430\u043c\u044f\u0442\u044c \u0442\u0435\u043a\u043b\u0430 \u0438\u0437-\u0437\u0430 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0438 \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u0431\u0438\u0440\u0430\u043b\u043e\u0441\u044c \u0441\u0432\u0435\u0440\u0445 \u043c\u0435\u0440\u044b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u043e, \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432<\/p>\n<pre><code class=\"bash\">composer install --no-dev<\/code><\/pre>\n<p>\u041a\u043e\u043c\u043f\u043e\u0437\u0435\u0440 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442 \u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 \u0437\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0442\u044c.<\/p>\n<p><a class=\"anchor\" name=\"migrations\" id=\"migrations\"><\/a><\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439<\/h2>\n<p>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e xsd \u0441\u0445\u0435\u043c\u0430\u043c, \u0441 \u0443\u0447\u0451\u0442\u043e\u043c <a href=\"https:\/\/habr.com\/ru\/articles\/763828#gar_mismatches\" rel=\"noopener noreferrer nofollow\">\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439<\/a>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439 \u0442\u0438\u043f \u043f\u043e\u043b\u0435\u0439 \u0432\u044b\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0440\u043e\u043a \u0441 \u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u043d\u0443\u043b\u0451\u043c &#8217;01&#8217; \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0441\u044f \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f.<\/p>\n<p>\u0412 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u044b. \u0422\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (VIEW) \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446 \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u0432 \u0421\u0423\u0411\u0414 PostgreSQL \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f 14 \u043c\u0438\u043d\u0443\u0442. \u042f \u0441\u0447\u0451\u043b \u044d\u0442\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c. \u041d\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 <a href=\"#loading_time\" rel=\"noopener noreferrer nofollow\">\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u2014 \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u043a \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445 \u043d\u0435\u0442. \u041f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0437\u0430\u0434\u0430\u043d\u0438\u044f\u043c\u0438:<\/p>\n<pre><code class=\"bash\">php artisan queue:table<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446, \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0432 \u0447\u0430\u0441\u0442\u0438 I<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u043e\u0435. \u0417\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0442.\u043a. \u043e\u043d\u0430 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0441\u0445\u0435\u043c\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043e\u0442 public, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u0438 \u043f\u043e\u043b\u044f created_at\/updated_at, \u0438 \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f. <\/p>\n<figure class=\"\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b house_params<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0445\u0435\u043c\u0443 \u00abgar\u00bb. \u0421\u0430\u043c\u0430 \u0441\u0445\u0435\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <strong>.env<\/strong>. \u0415\u0441\u043b\u0438 \u0421\u0423\u0411\u0414 \u043e\u0442\u043b\u0438\u0447\u043d\u0430 \u043e\u0442 pgsql, \u0442\u043e \u0441\u0445\u0435\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<pre><code class=\"bash\">php artisan make:migration create_schema_gar<\/code><\/pre>\n<details class=\"spoiler\">\n<summary>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 create_schema_gar<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Database\\Migrations\\Migration;  return new class extends Migration {     public function up(): void     {         if (config('database.default') === 'pgsql') DB::unprepared('create schema if not exists gar');     }      public function down(): void     {         if (config('database.default') === 'pgsql') DB::unprepared('drop schema if exists gar');     } };<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 addr_objs<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 artisan<\/p>\n<pre><code class=\"bash\">php artisan make:model Gar\\AddrObjs -m<\/code><\/pre>\n<p>\u041c<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-356249","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/356249","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=356249"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/356249\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=356249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=356249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=356249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}