{"id":339953,"date":"2022-10-19T15:00:08","date_gmt":"2022-10-19T15:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=339953"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=339953","title":{"rendered":"<span>\u00ab\u0420\u0430\u0431\u043e\u0447\u0438\u0435 \u043c\u0435\u0441\u0442\u0430\u00bb \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043a\u043e\u0447\u0435\u0432\u043d\u0438\u043a\u043e\u0432: \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0430\u0433\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0433\u043e API<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/287\/9a9\/2d3\/2879a92d3ea59f65057876d28f3fe0bf.jpg\" alt=\"\u041a\u0430\u0440\u0442\u0430 \u041a\u0438\u043f\u0440\u0430 \u0441 &quot;\u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043c\u0435\u0441\u0442\u0430\u043c\u0438&quot; \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043a\u043e\u0447\u0435\u0432\u043d\u0438\u043a\u043e\u0432\" title=\"\u041a\u0430\u0440\u0442\u0430 \u041a\u0438\u043f\u0440\u0430 \u0441 &quot;\u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043c\u0435\u0441\u0442\u0430\u043c\u0438&quot; \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043a\u043e\u0447\u0435\u0432\u043d\u0438\u043a\u043e\u0432\" width=\"1817\" height=\"1010\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/287\/9a9\/2d3\/2879a92d3ea59f65057876d28f3fe0bf.jpg\" data-blurred=\"true\"\/><figcaption>\u041a\u0430\u0440\u0442\u0430 \u041a\u0438\u043f\u0440\u0430 \u0441 &#171;\u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043c\u0435\u0441\u0442\u0430\u043c\u0438&#187; \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043a\u043e\u0447\u0435\u0432\u043d\u0438\u043a\u043e\u0432<\/figcaption><\/figure>\n<p>\u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 pet-\u043f\u0440\u043e\u0435\u043a\u0442: \u043f\u0440\u043e \u043a\u0430\u0444\u0435 \u0438 \u043a\u043e\u0432\u043e\u0440\u043a\u0438\u043d\u0433\u0438 \u043d\u0430 \u0441\u043e\u043b\u043d\u0435\u0447\u043d\u043e\u043c \u041a\u0438\u043f\u0440\u0435. &#171;\u0420\u0430\u0431\u043e\u0447\u0438\u0435 \u043c\u0435\u0441\u0442\u0430&#187; \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043a\u043e\u0447\u0435\u0432\u043d\u0438\u043a\u043e\u0432 \u30fd(\u3002_\u00b0)\u30ce<\/p>\n<p>\u0414\u0435\u043b\u044e\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0444\u0438\u0447\u0430\u043c\u0438 \u0438 \u0433\u0440\u0430\u0431\u043b\u044f\u043c\u0438. \u041e\u0431\u0449\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0430\u0433\u043c\u0430\u0442\u0438\u0447\u0435\u043d \u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d <a href=\"https:\/\/habr.com\/ru\/post\/677288\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443<\/a>.<\/p>\n<h3>\u0426\u0435\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>\u041a\u0430\u0444\u0435, \u043a\u043e\u0444\u0435\u0435\u043d, \u043a\u0430\u0444\u0435\u043d\u0438\u043e, \u0442\u0430\u0432\u0435\u0440\u043d, \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u043e\u0432 \u0438 \u0431\u0430\u0440\u043e\u0432 \u043d\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e, \u043d\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432. \u0415\u0441\u0442\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0448\u0438\u0440\u043e\u043a\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 Starbucks, Costa Coffee, Gloria Jeans Coffee \u0438 \u0442.\u0434., \u043d\u043e \u0435\u0449\u0451 \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0443\u044e\u0442\u043d\u044b\u0435 \u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u043e\u0446\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u0430 \u043f\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c: \u043a\u0430\u0444\u0435\/\u043a\u043e\u0432\u043e\u0440\u043a\u0438\u043d\u0433, \u0440\u043e\u0437\u0435\u0442\u043a\u0438, \u0448\u0443\u043c, \u0440\u0430\u0437\u043c\u0435\u0440, \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u044c, \u0432\u0438\u0434 \u0438\u0437 \u043e\u043a\u043d\u0430 \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u0430 \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u043c\u0435\u0441\u0442\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u0443\u044e \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0441\u0451 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, <a href=\"https:\/\/github.com\/workplacescy\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> \u043e\u0442\u043a\u0440\u044b\u0442, \u0432\u0435\u043b\u043a\u0430\u043c \u0432 \u043f\u0443\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u044b. \u0410\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430 &#8212; \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u043d\u0430 \u0440\u0435\u043a\u043b\u0430\u043c\u0443.<\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0439 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c REST API \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 Laravel \u0441 \u0430\u0434\u043c\u0438\u043d\u043a\u043e\u0439 \u043d\u0430 Twill \u0438 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Vue (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438). \u0414\u0435\u043f\u043b\u043e\u0439, \u043a\u0430\u043a \u0438 \u043f\u0440\u0435\u0436\u0434\u0435, \u043d\u0430 <a href=\"http:\/\/Fly.io\" rel=\"noopener noreferrer nofollow\">Fly.io<\/a>.<\/p>\n<h3>REST API \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441<\/h3>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043d \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0438 \u043b\u0451\u0433\u043a\u0438\u0439 Laravel \u0438 PHP 8.1 \u0441 promoted- \u0438 readonly- properties \u0438 \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p><a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/composer.json\" rel=\"noopener noreferrer nofollow\">composer.json<\/a> \u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/config\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u044b: \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0438 \u043a\u043b\u0430\u0441\u0441\u044b, \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d <a href=\"https:\/\/getcomposer.org\/doc\/06-config.md#platform-check\" rel=\"noopener noreferrer nofollow\">platform-check<\/a>, \u0432\u043a\u043b\u044e\u0447\u0435\u043d <a href=\"https:\/\/getcomposer.org\/doc\/06-config.md#classmap-authoritative\" rel=\"noopener noreferrer nofollow\">classmap-authoritative<\/a>.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c \u0432 4,5 \u0440\u0430\u0437\u0430 \u0441 28247 \u0434\u043e 6230 \u0448\u0442\u0443\u043a, \u043a\u0430\u0442\u0430\u043b\u043e\u0433 vendor &#171;\u043f\u043e\u0445\u0443\u0434\u0435\u043b&#187; \u043f\u043e\u0447\u0442\u0438 \u0432 1,5 \u0440\u0430\u0437\u0430, \u0442\u0435\u0441\u0442\u044b \u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0443\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h3>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Models\/Place.php\" rel=\"noopener noreferrer nofollow\">Place<\/a> &#8212; \u0442\u0438\u043f\u0438\u0447\u043d\u0430\u044f Laravel-\u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u043e\u0439 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 Twill (<code>A17\\Twill\\Models\\Model<\/code>).<\/p>\n<p><a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/app\/Enums\" rel=\"noopener noreferrer nofollow\">\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438<\/a> &#8212; \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 PHP enum&#8217;\u044b \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043e\u0431\u0449\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0438\u0437 \u0442\u0440\u0435\u0439\u0442\u0430 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Traits\/EnumValues.php\" rel=\"noopener noreferrer nofollow\">EnumValues<\/a> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u043a\u0438. \u041a\u0430\u0441\u0442\u044f\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0435\u0441\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0438 \u0432\u0435\u0441 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Enums\/Sockets.php\" rel=\"noopener noreferrer nofollow\">\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0440\u043e\u0437\u0435\u0442\u043e\u043a<\/a> \u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u043e, \u0447\u0435\u043c <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Enums\/View.php\" rel=\"noopener noreferrer nofollow\">\u0432\u0438\u0434 \u0438\u0437 \u043e\u043a\u043d\u0430<\/a>.<\/p>\n<pre><code class=\"php\">enum Sockets: string implements PropertyEnum {     use EnumValues;      case None = 'None';     case Few = 'Few';     case Many = 'Many';      public const WEIGHT = 3;       public static function default(): self     {         return self::Few;     }       \/** @inheritDoc *\/     public function coefficient(): int     {         return match ($this) {             self::None => 1,             self::Few => 3,             self::Many => 5,         };     } }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043a API \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f single-action \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c\u0438, \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f Request&#8217;\u0430\u043c\u0438 \u0432 \u0442.\u0447. \u043f\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044e \u0441 enum&#8217;\u0430\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Requests\/IndexRequest.php\" rel=\"noopener noreferrer nofollow\">IndexRequest<\/a>.<\/p>\n<pre><code class=\"php\">#[OA\\Parameter(name: 'busyness', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'city', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'size', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'sockets', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'noise', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'type', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'view', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'cuisine', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'vRate', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string', format: 'float', maximum: 0, minimum: 5))] final class IndexRequest extends FormRequest {     \/** @return array{busyness: string, city: string, size: string, sockets: string, noise: string, type: string, view: string} *\/     public function rules(): array     {         return [             'busyness' => ['sometimes', 'required', new Enum(Busyness::class)],             'city' => ['sometimes', 'required', new Enum(City::class)],             'size' => ['sometimes', 'required', new Enum(Size::class)],             'sockets' => ['sometimes', 'required', new Enum(Sockets::class)],             'noise' => ['sometimes', 'required', new Enum(Noise::class)],             'type' => ['sometimes', 'required', new Enum(Type::class)],             'view' => ['sometimes', 'required', new Enum(View::class)],             'cuisine' => ['sometimes', 'required', new Enum(Cuisine::class)],             'vRate' => ['sometimes', 'required', 'float', 'numeric', 'between:0,5'],         ];     } } <\/code><\/pre>\n<p>\u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 PHP-\u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c OpenAPI-\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0435\u0435, \u0447\u0435\u043c \u0432 DocBlock&#8217;\u0430\u0445. \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/storage\/openapi.yaml\" rel=\"noopener noreferrer nofollow\">openapi.yaml<\/a> \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/zircote.github.io\/swagger-php\/\" rel=\"noopener noreferrer nofollow\">swagger-php<\/a> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f API.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u043e\u0432, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/ModelFilters\/PlaceFilter.php\" rel=\"noopener noreferrer nofollow\">\u0444\u0438\u043b\u044c\u0442\u0440\u044b<\/a> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/github.com\/Tucker-Eric\/EloquentFilter\" rel=\"noopener noreferrer nofollow\">EloquentFilter<\/a> &#8212; \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0443\u0447\u0438 if&#8217;\u043e\u0432 \u0438 when&#8217;\u043e\u0432.<\/p>\n<p>\u0423 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0435\u0441\u0442\u044c \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0432 AWS S3 \u0438\u0437 \u0430\u0434\u043c\u0438\u043d\u043a\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c <a href=\"https:\/\/imgix.com\" rel=\"noopener noreferrer nofollow\">Imgix<\/a>. \u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 API \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0445 geo-\u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0437 Google Maps \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Services\/GooglePlacesService.php\" rel=\"noopener noreferrer nofollow\">GooglePlacesService<\/a> \u0438 \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/github.com\/alexpechkarev\/google-maps\/\" rel=\"noopener noreferrer nofollow\">alexpechkarev\/google-maps<\/a>. \u0412 API \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u0441\u0435 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c, \u0433\u043e\u0440\u043e\u0434\u043e\u043c \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0434\u043b\u044f \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0430\u0434\u0440\u0435\u0441 \u0438 \u0441\u0441\u044b\u043b\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0432 2 \u0448\u0430\u0433\u0430 \u0438\u0437 Google Places API.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Services\/VRateService.php\" rel=\"noopener noreferrer nofollow\">VRateService<\/a>.<\/p>\n<p>\u041e\u0431\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0437\u0430\u0432\u0451\u0440\u043d\u0443\u0442\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/app\/Actions\" rel=\"noopener noreferrer nofollow\">\u044d\u043a\u0448\u0435\u043d\u044b<\/a> \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/app\/Console\/Commands\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/a> \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Resources\/PlaceResource.php\" rel=\"noopener noreferrer nofollow\">PlaceResource<\/a> \u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Resources\/PlaceCollection.php\" rel=\"noopener noreferrer nofollow\">PlaceCollection<\/a>. \u0422\u0430\u043c \u0436\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u043d\u0438\u0435 \u043f\u043e\u043b\u044f. \u0414\u043b\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 JSON-\u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f middleware <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Middleware\/JsonResponse.php\" rel=\"noopener noreferrer nofollow\">JsonResponse.php<\/a><\/p>\n<pre><code class=\"php\">final class JsonResponse {     \/** @param Closure(Request): (BaseJsonResponse) $next *\/     public function handle(Request $request, Closure $next): BaseJsonResponse     {         $request->headers->set('Accept', 'application\/json');          return $next($request);     } }<\/code><\/pre>\n<h3>\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0420\u0430\u043d\u0435\u0435 \u044f \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 <a href=\"https:\/\/twill.io\/\" rel=\"noopener noreferrer nofollow\">Twill<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441 \u0431\u043e\u0433\u0430\u0442\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439. Why not? \ud83d\ude42<\/p>\n<p>\u0421\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>composer require area17\/twill<\/code>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043d\u0438\u043c \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0442\u0438\u043f\u0430 <code>published<\/code> \u0438 \u0434\u0430\u0442 \u043d\u0430\u0447\u0430\u043b\u0430\/\u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0430\u043a\u0432\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0441\u0451 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e 3-beta: \u0432 \u043d\u0435\u0439 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 blade-\u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/857\/156\/ef2\/857156ef245be74effc531af24f8a018.png\" width=\"1903\" height=\"1080\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/857\/156\/ef2\/857156ef245be74effc531af24f8a018.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Controllers\/Twill\/PlaceController.php\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437\u0434\u0435\u043b\u0430<\/a>, <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Repositories\/PlaceRepository.php\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u044f<\/a> \u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/resources\/views\/twill\/places\/form.blade.php\" rel=\"noopener noreferrer nofollow\">\u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/a>.<\/p>\n<h3>\u0411\u0414<\/h3>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0431\u044b\u0441\u0442\u0440\u0430\u044f SQLite <em>\u00af_(\u30c4)_\/\u00af<\/em><\/p>\n<p>\u041d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0430 \u043d\u0430 persistent volume. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c.<\/p>\n<h3>\u0422\u0435\u0441\u0442\u044b<\/h3>\n<p>\u0414\u043b\u044f <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/tests\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442\u043e\u0432<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/pestphp.com\/\" rel=\"noopener noreferrer nofollow\">Pest<\/a> \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 Laravel, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0442\u0440\u043e\u0442\u043b\u0438\u043d\u0433\u043e\u043c (<code>$this->withoutMiddleware(ThrottleRequests::class)<\/code>).<\/p>\n<p>\u041f\u043e \u044d\u043d\u0434\u043f\u043e\u0439\u0442\u0430\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/tests\/Datasets\" rel=\"noopener noreferrer nofollow\">dataset<\/a>&#8216;\u0430\u043c \u0438 \u0438\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441 OpenAPI-\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/rectorphp\/rector\/\" rel=\"noopener noreferrer nofollow\">Rector<\/a> \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/rector.php\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/a>.<\/p>\n<p>\u041d\u0430\u0448\u0451\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u043c\u0438\u043d\u0443\u0441: laravel\/dusk \u0438 php-webdriver\/webdriver \u043f\u0440\u0438\u0431\u0438\u0442\u044b \u043a Twill \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0445\u043e\u0442\u044f \u0432 \u043c\u043e\u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u0445 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <em>\ud83d\ude41<\/em><\/p>\n<h3>\u0414\u0435\u043f\u043b\u043e\u0439<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 <a href=\"http:\/\/Fly.io\" rel=\"noopener noreferrer nofollow\">Fly.io<\/a> \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c\u0438 microVM Firecracker. \u041e\u043d\u0430 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u043f\u0438\u0442, \u0438\u043c\u0435\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 free tier \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0438\u043a\u0443, \u0442\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u0430\u043c\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u0443\u0435\u0442 https-\u0442\u0440\u0430\u0444\u0438\u043a, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0434\u0435\u043f\u043b\u043e\u044f \u0438 \u043e\u0442\u043a\u0430\u0442\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, health check&#8217;\u0438 \u0438 \u0438\u043c\u0435\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u0443\u044e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>flyctl launch<\/code> \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 Dockerfile.<\/p>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u0439 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/Dockerfile\" rel=\"noopener noreferrer nofollow\">Dockerfile<\/a> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0430 API \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0447\u0435\u0440\u0435\u0437 <code>php artisan serve<\/code>.<\/p>\n<p>\u0420\u0430\u0437\u0434\u0430\u0447\u0443 \u0441\u0442\u0430\u0442\u0438\u043a\u0438 (\u0430\u0441\u0441\u0435\u0442\u044b \u0430\u0434\u043c\u0438\u043d\u043a\u0438 \u0438 robots.txt &amp; Co) \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Fly \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/fly.toml\" rel=\"noopener noreferrer nofollow\">fly.toml<\/a><\/p>\n<pre><code>[[statics]] guest_path = \"\/var\/www\/html\/public\/assets\" url_prefix = \"\/assets\"<\/code><\/pre>\n<h3>CI\/CD<\/h3>\n<p>\u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/.github\/workflows\/deploy.yml\" rel=\"noopener noreferrer nofollow\">Github Action \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e workflow<\/a> \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 flyctl.<\/p>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/h3>\n<p>\u0414\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/sentry.io\/\" rel=\"noopener noreferrer nofollow\">Sentry<\/a>, \u0430 \u0434\u043b\u044f \u0430\u043f\u0442\u0430\u0439\u043c\u0430 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 &#8212; <a href=\"https:\/\/www.honeybadger.io\/\" rel=\"noopener noreferrer nofollow\">Honeybadger<\/a>.<\/p>\n<p><strong>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441 API \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d \u0432 production-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c. \u041f\u043b\u0430\u043d-\u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \ud83d\ude42<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/workplacescy\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 API<\/a>, \u0441\u0430\u0439\u0442 <a href=\"https:\/\/workplaces.cy\/\" rel=\"noopener noreferrer nofollow\">https:\/\/workplaces.cy\/<\/a><\/p>\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0430 \u043d\u0430 Vue 3 Composition API.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/694142\/\"> https:\/\/habr.com\/ru\/post\/694142\/<\/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<figure class=\"full-width\"><figcaption>\u041a\u0430\u0440\u0442\u0430 \u041a\u0438\u043f\u0440\u0430 \u0441 &#171;\u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043c\u0435\u0441\u0442\u0430\u043c\u0438&#187; \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043a\u043e\u0447\u0435\u0432\u043d\u0438\u043a\u043e\u0432<\/figcaption><\/figure>\n<p>\u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 pet-\u043f\u0440\u043e\u0435\u043a\u0442: \u043f\u0440\u043e \u043a\u0430\u0444\u0435 \u0438 \u043a\u043e\u0432\u043e\u0440\u043a\u0438\u043d\u0433\u0438 \u043d\u0430 \u0441\u043e\u043b\u043d\u0435\u0447\u043d\u043e\u043c \u041a\u0438\u043f\u0440\u0435. &#171;\u0420\u0430\u0431\u043e\u0447\u0438\u0435 \u043c\u0435\u0441\u0442\u0430&#187; \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043a\u043e\u0447\u0435\u0432\u043d\u0438\u043a\u043e\u0432 \u30fd(\u3002_\u00b0)\u30ce<\/p>\n<p>\u0414\u0435\u043b\u044e\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0444\u0438\u0447\u0430\u043c\u0438 \u0438 \u0433\u0440\u0430\u0431\u043b\u044f\u043c\u0438. \u041e\u0431\u0449\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0430\u0433\u043c\u0430\u0442\u0438\u0447\u0435\u043d \u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d <a href=\"https:\/\/habr.com\/ru\/post\/677288\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443<\/a>.<\/p>\n<h3>\u0426\u0435\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>\u041a\u0430\u0444\u0435, \u043a\u043e\u0444\u0435\u0435\u043d, \u043a\u0430\u0444\u0435\u043d\u0438\u043e, \u0442\u0430\u0432\u0435\u0440\u043d, \u0440\u0435\u0441\u0442\u043e\u0440\u0430\u043d\u043e\u0432 \u0438 \u0431\u0430\u0440\u043e\u0432 \u043d\u0430 \u043e\u0441\u0442\u0440\u043e\u0432\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e, \u043d\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432. \u0415\u0441\u0442\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0448\u0438\u0440\u043e\u043a\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 Starbucks, Costa Coffee, Gloria Jeans Coffee \u0438 \u0442.\u0434., \u043d\u043e \u0435\u0449\u0451 \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0443\u044e\u0442\u043d\u044b\u0435 \u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u043e\u0446\u0435\u043d\u0451\u043d\u043d\u044b\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u0430 \u043f\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c: \u043a\u0430\u0444\u0435\/\u043a\u043e\u0432\u043e\u0440\u043a\u0438\u043d\u0433, \u0440\u043e\u0437\u0435\u0442\u043a\u0438, \u0448\u0443\u043c, \u0440\u0430\u0437\u043c\u0435\u0440, \u0437\u0430\u043d\u044f\u0442\u043e\u0441\u0442\u044c, \u0432\u0438\u0434 \u0438\u0437 \u043e\u043a\u043d\u0430 \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u0430 \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u043c\u0435\u0441\u0442\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u0443\u044e \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0441\u0451 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, <a href=\"https:\/\/github.com\/workplacescy\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> \u043e\u0442\u043a\u0440\u044b\u0442, \u0432\u0435\u043b\u043a\u0430\u043c \u0432 \u043f\u0443\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u044b. \u0410\u0434\u0440\u0435\u0441 \u0441\u0430\u0439\u0442\u0430 &#8212; \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0434\u0438\u043b\u043e \u043d\u0430 \u0440\u0435\u043a\u043b\u0430\u043c\u0443.<\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0435\u0439 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c REST API \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 Laravel \u0441 \u0430\u0434\u043c\u0438\u043d\u043a\u043e\u0439 \u043d\u0430 Twill \u0438 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Vue (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438). \u0414\u0435\u043f\u043b\u043e\u0439, \u043a\u0430\u043a \u0438 \u043f\u0440\u0435\u0436\u0434\u0435, \u043d\u0430 <a href=\"http:\/\/Fly.io\" rel=\"noopener noreferrer nofollow\">Fly.io<\/a>.<\/p>\n<h3>REST API \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441<\/h3>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043d \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u0438 \u043b\u0451\u0433\u043a\u0438\u0439 Laravel \u0438 PHP 8.1 \u0441 promoted- \u0438 readonly- properties \u0438 \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p><a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/composer.json\" rel=\"noopener noreferrer nofollow\">composer.json<\/a> \u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/config\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u044b: \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0438 \u043a\u043b\u0430\u0441\u0441\u044b, \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d <a href=\"https:\/\/getcomposer.org\/doc\/06-config.md#platform-check\" rel=\"noopener noreferrer nofollow\">platform-check<\/a>, \u0432\u043a\u043b\u044e\u0447\u0435\u043d <a href=\"https:\/\/getcomposer.org\/doc\/06-config.md#classmap-authoritative\" rel=\"noopener noreferrer nofollow\">classmap-authoritative<\/a>.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u043e\u0441\u044c \u0432 4,5 \u0440\u0430\u0437\u0430 \u0441 28247 \u0434\u043e 6230 \u0448\u0442\u0443\u043a, \u043a\u0430\u0442\u0430\u043b\u043e\u0433 vendor &#171;\u043f\u043e\u0445\u0443\u0434\u0435\u043b&#187; \u043f\u043e\u0447\u0442\u0438 \u0432 1,5 \u0440\u0430\u0437\u0430, \u0442\u0435\u0441\u0442\u044b \u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0443\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h3>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Models\/Place.php\" rel=\"noopener noreferrer nofollow\">Place<\/a> &#8212; \u0442\u0438\u043f\u0438\u0447\u043d\u0430\u044f Laravel-\u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u043e\u0439 \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 Twill (<code>A17\\Twill\\Models\\Model<\/code>).<\/p>\n<p><a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/app\/Enums\" rel=\"noopener noreferrer nofollow\">\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438<\/a> &#8212; \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 PHP enum&#8217;\u044b \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043e\u0431\u0449\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0438\u0437 \u0442\u0440\u0435\u0439\u0442\u0430 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Traits\/EnumValues.php\" rel=\"noopener noreferrer nofollow\">EnumValues<\/a> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u043a\u0438. \u041a\u0430\u0441\u0442\u044f\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0435\u0441\u0442\u044c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0438 \u0432\u0435\u0441 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Enums\/Sockets.php\" rel=\"noopener noreferrer nofollow\">\u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0440\u043e\u0437\u0435\u0442\u043e\u043a<\/a> \u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u043e, \u0447\u0435\u043c <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Enums\/View.php\" rel=\"noopener noreferrer nofollow\">\u0432\u0438\u0434 \u0438\u0437 \u043e\u043a\u043d\u0430<\/a>.<\/p>\n<pre><code class=\"php\">enum Sockets: string implements PropertyEnum {     use EnumValues;      case None = 'None';     case Few = 'Few';     case Many = 'Many';      public const WEIGHT = 3;       public static function default(): self     {         return self::Few;     }       \/** @inheritDoc *\/     public function coefficient(): int     {         return match ($this) {             self::None => 1,             self::Few => 3,             self::Many => 5,         };     } }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043a API \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f single-action \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c\u0438, \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f Request&#8217;\u0430\u043c\u0438 \u0432 \u0442.\u0447. \u043f\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044e \u0441 enum&#8217;\u0430\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Requests\/IndexRequest.php\" rel=\"noopener noreferrer nofollow\">IndexRequest<\/a>.<\/p>\n<pre><code class=\"php\">#[OA\\Parameter(name: 'busyness', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'city', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'size', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'sockets', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'noise', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'type', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'view', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'cuisine', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string'))] #[OA\\Parameter(name: 'vRate', in: 'query', allowEmptyValue: false, schema: new OA\\Schema(type: 'string', format: 'float', maximum: 0, minimum: 5))] final class IndexRequest extends FormRequest {     \/** @return array{busyness: string, city: string, size: string, sockets: string, noise: string, type: string, view: string} *\/     public function rules(): array     {         return [             'busyness' => ['sometimes', 'required', new Enum(Busyness::class)],             'city' => ['sometimes', 'required', new Enum(City::class)],             'size' => ['sometimes', 'required', new Enum(Size::class)],             'sockets' => ['sometimes', 'required', new Enum(Sockets::class)],             'noise' => ['sometimes', 'required', new Enum(Noise::class)],             'type' => ['sometimes', 'required', new Enum(Type::class)],             'view' => ['sometimes', 'required', new Enum(View::class)],             'cuisine' => ['sometimes', 'required', new Enum(Cuisine::class)],             'vRate' => ['sometimes', 'required', 'float', 'numeric', 'between:0,5'],         ];     } } <\/code><\/pre>\n<p>\u041d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 PHP-\u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c OpenAPI-\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0435\u0435, \u0447\u0435\u043c \u0432 DocBlock&#8217;\u0430\u0445. \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/storage\/openapi.yaml\" rel=\"noopener noreferrer nofollow\">openapi.yaml<\/a> \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/zircote.github.io\/swagger-php\/\" rel=\"noopener noreferrer nofollow\">swagger-php<\/a> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f API.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u043e\u0432, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/ModelFilters\/PlaceFilter.php\" rel=\"noopener noreferrer nofollow\">\u0444\u0438\u043b\u044c\u0442\u0440\u044b<\/a> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/github.com\/Tucker-Eric\/EloquentFilter\" rel=\"noopener noreferrer nofollow\">EloquentFilter<\/a> &#8212; \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0443\u0447\u0438 if&#8217;\u043e\u0432 \u0438 when&#8217;\u043e\u0432.<\/p>\n<p>\u0423 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0435\u0441\u0442\u044c \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0432 AWS S3 \u0438\u0437 \u0430\u0434\u043c\u0438\u043d\u043a\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c <a href=\"https:\/\/imgix.com\" rel=\"noopener noreferrer nofollow\">Imgix<\/a>. \u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 API \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0445 geo-\u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0437 Google Maps \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Services\/GooglePlacesService.php\" rel=\"noopener noreferrer nofollow\">GooglePlacesService<\/a> \u0438 \u043f\u0430\u043a\u0435\u0442 <a href=\"https:\/\/github.com\/alexpechkarev\/google-maps\/\" rel=\"noopener noreferrer nofollow\">alexpechkarev\/google-maps<\/a>. \u0412 API \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u0441\u0435 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c, \u0433\u043e\u0440\u043e\u0434\u043e\u043c \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0434\u043b\u044f \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0430\u0434\u0440\u0435\u0441 \u0438 \u0441\u0441\u044b\u043b\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0432 2 \u0448\u0430\u0433\u0430 \u0438\u0437 Google Places API.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Services\/VRateService.php\" rel=\"noopener noreferrer nofollow\">VRateService<\/a>.<\/p>\n<p>\u041e\u0431\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0437\u0430\u0432\u0451\u0440\u043d\u0443\u0442\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/app\/Actions\" rel=\"noopener noreferrer nofollow\">\u044d\u043a\u0448\u0435\u043d\u044b<\/a> \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/app\/Console\/Commands\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/a> \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0437\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Resources\/PlaceResource.php\" rel=\"noopener noreferrer nofollow\">PlaceResource<\/a> \u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Resources\/PlaceCollection.php\" rel=\"noopener noreferrer nofollow\">PlaceCollection<\/a>. \u0422\u0430\u043c \u0436\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u043d\u0438\u0435 \u043f\u043e\u043b\u044f. \u0414\u043b\u044f \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 JSON-\u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f middleware <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Middleware\/JsonResponse.php\" rel=\"noopener noreferrer nofollow\">JsonResponse.php<\/a><\/p>\n<pre><code class=\"php\">final class JsonResponse {     \/** @param Closure(Request): (BaseJsonResponse) $next *\/     public function handle(Request $request, Closure $next): BaseJsonResponse     {         $request->headers->set('Accept', 'application\/json');          return $next($request);     } }<\/code><\/pre>\n<h3>\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0420\u0430\u043d\u0435\u0435 \u044f \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 <a href=\"https:\/\/twill.io\/\" rel=\"noopener noreferrer nofollow\">Twill<\/a>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441 \u0431\u043e\u0433\u0430\u0442\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439. Why not? \ud83d\ude42<\/p>\n<p>\u0421\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>composer require area17\/twill<\/code>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0438 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043d\u0438\u043c \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0442\u0438\u043f\u0430 <code>published<\/code> \u0438 \u0434\u0430\u0442 \u043d\u0430\u0447\u0430\u043b\u0430\/\u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0430\u043a\u0432\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432\u0441\u0451 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e.<\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e 3-beta: \u0432 \u043d\u0435\u0439 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 blade-\u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Http\/Controllers\/Twill\/PlaceController.php\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0437\u0434\u0435\u043b\u0430<\/a>, <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/app\/Repositories\/PlaceRepository.php\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u044f<\/a> \u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/resources\/views\/twill\/places\/form.blade.php\" rel=\"noopener noreferrer nofollow\">\u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/a>.<\/p>\n<h3>\u0411\u0414<\/h3>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0431\u044b\u0441\u0442\u0440\u0430\u044f SQLite <em>\u00af_(\u30c4)_\/\u00af<\/em><\/p>\n<p>\u041d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0430 \u043d\u0430 persistent volume. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c.<\/p>\n<h3>\u0422\u0435\u0441\u0442\u044b<\/h3>\n<p>\u0414\u043b\u044f <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/tests\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442\u043e\u0432<\/a> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/pestphp.com\/\" rel=\"noopener noreferrer nofollow\">Pest<\/a> \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 Laravel, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0442\u0440\u043e\u0442\u043b\u0438\u043d\u0433\u043e\u043c (<code>$this->withoutMiddleware(ThrottleRequests::class)<\/code>).<\/p>\n<p>\u041f\u043e \u044d\u043d\u0434\u043f\u043e\u0439\u0442\u0430\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e <a href=\"https:\/\/github.com\/workplacescy\/api\/tree\/develop\/tests\/Datasets\" rel=\"noopener noreferrer nofollow\">dataset<\/a>&#8216;\u0430\u043c \u0438 \u0438\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441 OpenAPI-\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/rectorphp\/rector\/\" rel=\"noopener noreferrer nofollow\">Rector<\/a> \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/rector.php\" rel=\"noopener noreferrer nofollow\">\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/a>.<\/p>\n<p>\u041d\u0430\u0448\u0451\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u043c\u0438\u043d\u0443\u0441: laravel\/dusk \u0438 php-webdriver\/webdriver \u043f\u0440\u0438\u0431\u0438\u0442\u044b \u043a Twill \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0445\u043e\u0442\u044f \u0432 \u043c\u043e\u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u0445 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f <em>\ud83d\ude41<\/em><\/p>\n<h3>\u0414\u0435\u043f\u043b\u043e\u0439<\/h3>\n<p>\u0414\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 <a href=\"http:\/\/Fly.io\" rel=\"noopener noreferrer nofollow\">Fly.io<\/a> \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c\u0438 microVM Firecracker. \u041e\u043d\u0430 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u043f\u0438\u0442, \u0438\u043c\u0435\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 free tier \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0438\u043a\u0443, \u0442\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u0430\u043c\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u0443\u0435\u0442 https-\u0442\u0440\u0430\u0444\u0438\u043a, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430\u043c\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0434\u0435\u043f\u043b\u043e\u044f \u0438 \u043e\u0442\u043a\u0430\u0442\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, health check&#8217;\u0438 \u0438 \u0438\u043c\u0435\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u0443\u044e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>flyctl launch<\/code> \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043e\u043d\u0444\u0438\u0433 \u0438 Dockerfile.<\/p>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0432\u043e\u0439 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/Dockerfile\" rel=\"noopener noreferrer nofollow\">Dockerfile<\/a> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0430 API \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0447\u0435\u0440\u0435\u0437 <code>php artisan serve<\/code>.<\/p>\n<p>\u0420\u0430\u0437\u0434\u0430\u0447\u0443 \u0441\u0442\u0430\u0442\u0438\u043a\u0438 (\u0430\u0441\u0441\u0435\u0442\u044b \u0430\u0434\u043c\u0438\u043d\u043a\u0438 \u0438 robots.txt &amp; Co) \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Fly \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/fly.toml\" rel=\"noopener noreferrer nofollow\">fly.toml<\/a><\/p>\n<pre><code>[[statics]] guest_path = \"\/var\/www\/html\/public\/assets\" url_prefix = \"\/assets\"<\/code><\/pre>\n<h3>CI\/CD<\/h3>\n<p>\u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: <a href=\"https:\/\/github.com\/workplacescy\/api\/blob\/develop\/.github\/workflows\/deploy.yml\" rel=\"noopener noreferrer nofollow\">Github Action \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e workflow<\/a> \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 flyctl.<\/p>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/h3>\n<p>\u0414\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/sentry.io\/\" rel=\"noopener noreferrer nofollow\">Sentry<\/a>, \u0430 \u0434\u043b\u044f \u0430\u043f\u0442\u0430\u0439\u043c\u0430 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 &#8212; <a href=\"https:\/\/www.honeybadger.io\/\" rel=\"noopener noreferrer nofollow\">Honeybadger<\/a>.<\/p>\n<p><strong>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441 API \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d \u0432 production-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c. \u041f\u043b\u0430\u043d-\u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \ud83d\ude42<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/workplacescy\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 API<\/a>, \u0441\u0430\u0439\u0442 <a href=\"https:\/\/workplaces.cy\/\" rel=\"noopener noreferrer nofollow\">https:\/\/workplaces.cy\/<\/a><\/p>\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0440\u043e\u043d\u0442\u044d\u043d\u0434\u0430 \u043d\u0430 Vue 3 Composition API.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/694142\/\"> https:\/\/habr.com\/ru\/post\/694142\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-339953","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339953","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=339953"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/339953\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=339953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=339953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=339953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}