{"id":318278,"date":"2021-12-30T13:08:06","date_gmt":"2021-12-30T13:08:06","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=318278"},"modified":"2021-12-30T13:08:09","modified_gmt":"2021-12-30T13:08:09","slug":"how-to-config-the-custom-field-with-default-entity","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/","title":{"rendered":"How to config the custom field with default entity"},"content":{"rendered":"\n<p>In this blog, you are going to learn \u201cHow to config the custom field with default entity.\u201d<br>I hope you know the directory structure of\u00a0<a href=\"https:\/\/webkul.com\/blog\/create-product-and-product-variant-in-shopware-6\/\">Shopware<\/a>\u00a06 plugin, if you don\u2019t know, see here-\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/webkul.com\/blog\/create-product-and-product-variant-in-shopware-6\/\" target=\"_blank\">https:\/\/docs.shopware.com\/en\/shopware-platform-dev-en\/internals\/directory-structure<\/a>.<\/p>\n\n\n\n<p>The purpose of custom field is  used to add the additional information in the entity, so that we can used that information according to our need. It allows you to extend entities.<\/p>\n\n\n\n<p>For adding the custom field, you can write the query in the migration file. In my case, I write in the base file of plugin under install function of plugin.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">WebkulTest.php<\/h6>\n\n\n\n<pre class=\"EnlighterJSRAW\">public function install(InstallContext $installContext): void\n    {\n        $customFieldRepository = $this-&gt;container-&gt;get(&#039;custom_field_set.repository&#039;);\n        $customFieldData = $customFieldRepository-&gt;search((new Criteria())-&gt;addFilter(new EqualsFilter(&#039;name&#039;,&#039;sample_task&#039;)), $installContext-&gt;getContext())-&gt;first();\n        if (!$customFieldData) {\n            $customFieldRepository-&gt;create(&#091;\n                &#091;\n                    &#039;name&#039; =&gt; &#039;sample_task&#039;,\n                    &#039;config&#039; =&gt; &#091;\n                        &#039;label&#039; =&gt; &#091;\n                            &#039;en-GB&#039; =&gt; &#039;Sample Task&#039;,\n                            &#039;de-DE&#039; =&gt; &#039;Sample Task&#039;\n                        ]\n                    ],\n                    &#039;customFields&#039; =&gt; &#091;\n                        &#091;\n                            &#039;name&#039; =&gt; &#039;sample_task_floor&#039;,\n                            &#039;type&#039; =&gt; CustomFieldTypes::INT,\n                            &#039;config&#039; =&gt; &#091;\n                                &#039;label&#039; =&gt; &#091;\n                                &#039;en-GB&#039; =&gt; &#039;Floor&#039;,\n                                &#039;de-DE&#039; =&gt; &#039;Floor&#039;\n                                ],\n                                &#039;type&#039; =&gt; &#039;number&#039;,\n                                &#039;componentName&#039;=&gt; &#039;sw-field&#039;,\n                                &#039;customFieldType&#039;=&gt; &#039;number&#039;,\n                            ]\n                        ]\n                    ],\n                \n                    &#039;relations&#039; =&gt; &#091;\n                        &#091;\n                        &#039;entityName&#039; =&gt; &#039;customer_address&#039;\n                        ]\n                    ]\n                ]\n            ], $installContext-&gt;getContext());\n        }\n    \n    }<\/pre>\n\n\n\n<p>In the above code, add the custom field for floor value which is type of number with the relation of customer address table which means floor field is linked\/relation with customer address table.<\/p>\n\n\n\n<p>It automatically add the floor field under the custom field section of customer address in the admin.Now we need to save the floor value from the storefront section. So override the <code>address-form.html.twig<\/code> file and add the input field for floor.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">address-form.html.twig<\/h6>\n\n\n\n<pre class=\"EnlighterJSRAW\">{% sw_extends &#039;@Storefront\/storefront\/component\/address\/address-form.html.twig&#039; %}\n\n{% block component_address_form_street\n%}\n{% block component_address_form_floor %}\n    &lt;div class=&quot;form-group col-md-6&quot;&gt;\n        {% if formViolations.getViolations(&quot;\/floor&quot;) is not empty %}\n            {% set violationPath = &quot;\/floor&quot; %}\n        {% elseif formViolations.getViolations(&quot;\/#{prefix}\/floor&quot;) is not empty %}\n            {% set violationPath = &quot;\/#{prefix}\/floor&quot; %}\n        {% endif %}\n\n        {% block component_address_form_floor_label %}\n            &lt;label class=&quot;form-label&quot;\n                for=&quot;{{ idPrefix ~ prefix }}AddressFloor&quot;&gt;\n                Floor{{ &quot;general.required&quot;|trans|sw_sanitize }}\n            &lt;\/label&gt;\n        {% endblock %}\n    \n        {% block component_address_form_floor_input %}\n            &lt;input type=&quot;number&quot;\n                class=&quot;form-control{% if violationPath %} is-invalid{% endif %}&quot;\n                id=&quot;{{ idPrefix ~ prefix }}AddressFloor&quot;\n                placeholder=&quot;Enter the Floor of building&quot;\n                name=&quot;{{ prefix }}&#091;floor]&quot;\n                value=&quot;{{ data.get(&#039;customFields&#039;)&#091;&#039;sample_task_floor&#039;] }}&quot;\n                required=&quot;required&quot;&gt;\n        {% endblock %}\n\n        {% block component_address_form_floor_input_error %}\n            {% if violationPath %}\n                {% sw_include &#039;@Storefront\/storefront\/utilities\/form-violation.html.twig&#039; %}\n            {% endif %}\n        {% endblock %}\n    &lt;\/div&gt;\n    {% endblock %}\n    {{parent()}}\n{% endblock %}<\/pre>\n\n\n\n<p>In above code, extends the <code>address-form.html.twig<\/code>  and override the block <code>component_address_form_street<\/code> and add input field for floor same as the address form is implement.<\/p>\n\n\n\n<p>Now one part is remaining that is how to save the floor value in the custom field of customer address table.<br>We need to use the event subscriber of the shopware.<\/p>\n\n\n\n<p> <\/p>\n\n\n\n<h6 class=\"wp-block-heading\">TestSubscriber.php<\/h6>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php declare(strict_types=1);\n\nnamespace Sample\\Task\\Subscriber;\n\nuse Shopware\\Core\\Checkout\\Customer\\CustomerEvents;\nuse Shopware\\Core\\Checkout\\Customer\\Event\\CustomerLoginEvent;\nuse Shopware\\Core\\Checkout\\Customer\\Event\\CustomerLogoutEvent;\nuse Shopware\\Core\\Checkout\\Customer\\Event\\CustomerRegisterEvent;\nuse Shopware\\Core\\Content\\Product\\ProductEvents;\nuse Shopware\\Core\\Framework\\Context;\nuse Shopware\\Core\\Framework\\DataAbstractionLayer\\EntityRepositoryInterface;\nuse Shopware\\Core\\Framework\\DataAbstractionLayer\\Event\\EntityLoadedEvent;\nuse Shopware\\Core\\Framework\\DataAbstractionLayer\\Event\\EntityWrittenEvent;\nuse Symfony\\Component\\DependencyInjection\\ContainerInterface;\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\n\nclass RegisterSubscriber implements EventSubscriberInterface\n{   \n    \/**\n     * @var ContainerInterface\n     *\/\n    private $container;\n\n    \/**\n     * @var EntityRepositoryInterface\n     *\/\n    protected $customerAddressRepository;\n\n    public function __construct(ContainerInterface $container, EntityRepositoryInterface $customerAddressRepository)\n    {\n        $this-&gt;container = $container;\n        $this-&gt;customerAddressRepository = $customerAddressRepository;\n    }\n\n    public static function getSubscribedEvents(): array\n    {\n        return &#091;\n            CustomerEvents::CUSTOMER_ADDRESS_WRITTEN_EVENT =&gt; &#039;addFloor&#039;,\n        ];\n    }\n    public function addFloor(EntityWrittenEvent $event) {\n        $requestStack = $this-&gt;container-&gt;get(&#039;request_stack&#039;);\n        $request = $requestStack-&gt;getCurrentRequest();\n        if ($request-&gt;request-&gt;get(&#039;address&#039;)) {\n            $floor = $request-&gt;request-&gt;get(&#039;address&#039;)&#091;&#039;floor&#039;];\n        } else if ($request-&gt;request-&gt;get(&#039;shippingAddress&#039;)) {\n            $floor = $request-&gt;request-&gt;get(&#039;shippingAddress&#039;)&#091;&#039;floor&#039;];\n        } else {\n            $floor = $request-&gt;request-&gt;get(&#039;billingAddress&#039;)&#091;&#039;floor&#039;];\n        }\n      \n        if ($event-&gt;getWriteResults() &amp;&amp; $floor) {\n            foreach($event-&gt;getWriteResults() as $data) {\n                if ($data-&gt;getExistence() !== null &amp;&amp; $data-&gt;getExistence()-&gt;exists()) {\n                    break;\n                }\n                $payload = $data-&gt;getPayload();\n                if ($payload) {\n                    $operation = $data-&gt;getOperation();                    \n                    $id = $payload&#091;&#039;id&#039;];\n                    $customField = array(&quot;sample_task_floor&quot; =&gt; (int)$floor);\n                    $customerAddress = &#091;\n                        &#039;id&#039; =&gt; $id,\n                        &#039;customFields&#039; =&gt; $customField\n                    ];\n                    \n                    $this-&gt;customerAddressRepository-&gt;upsert(&#091;$customerAddress], Context::createDefaultContext());\n\n                }\n            }\n        }\n    }\n}<\/pre>\n\n\n\n<p>In the above code, we used the <code>CUSTOMER_ADDRESS_WRITTEN_EVENT<\/code> of <code>CustomerEvents<\/code>. In the case whenever the address is written in the table that event is called and we get all the value of customer address. Now how to get the floor value for that we used the request stack class. <\/p>\n\n\n\n<p>From request stack we get current request of the shopware, in there we also get the floor value which save from the storefront and we have <code>id<\/code> of customer address table from the event and floor value.Now persist the floor value in the custom field of customer address table as you can seen in the above code.<\/p>\n\n\n\n<p>Hope it will help you. Thanks for reading. Happy Coding \ud83d\ude42<br>Thank You.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, you are going to learn \u201cHow to config the custom field with default entity.\u201dI hope you know the directory structure of\u00a0Shopware\u00a06 plugin, if you don\u2019t know, see here-\u00a0https:\/\/docs.shopware.com\/en\/shopware-platform-dev-en\/internals\/directory-structure. The purpose of custom field is used to add the additional information in the entity, so that we can used that information according to <a href=\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":284,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9568],"tags":[],"class_list":["post-318278","post","type-post","status-publish","format-standard","hentry","category-shopware"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to config the custom field with default entity - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to config the custom field with default entity - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"In this blog, you are going to learn \u201cHow to config the custom field with default entity.\u201dI hope you know the directory structure of\u00a0Shopware\u00a06 plugin, if you don\u2019t know, see here-\u00a0https:\/\/docs.shopware.com\/en\/shopware-platform-dev-en\/internals\/directory-structure. The purpose of custom field is used to add the additional information in the entity, so that we can used that information according to [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-30T13:08:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-30T13:08:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Diwakar Rana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Diwakar Rana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/\"},\"author\":{\"name\":\"Diwakar Rana\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/4b025fe4ecbc5c0378cd13bb70da654f\"},\"headline\":\"How to config the custom field with default entity\",\"datePublished\":\"2021-12-30T13:08:06+00:00\",\"dateModified\":\"2021-12-30T13:08:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/\"},\"wordCount\":363,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"articleSection\":[\"Shopware\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/\",\"name\":\"How to config the custom field with default entity - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2021-12-30T13:08:06+00:00\",\"dateModified\":\"2021-12-30T13:08:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to config the custom field with default entity\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/4b025fe4ecbc5c0378cd13bb70da654f\",\"name\":\"Diwakar Rana\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/46482d0264c191ccd0337892016340a80ca4e4987a37f42514a0506aaee7e8dc?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/46482d0264c191ccd0337892016340a80ca4e4987a37f42514a0506aaee7e8dc?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Diwakar Rana\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/diwakar-rana829\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to config the custom field with default entity - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/","og_locale":"en_US","og_type":"article","og_title":"How to config the custom field with default entity - Webkul Blog","og_description":"In this blog, you are going to learn \u201cHow to config the custom field with default entity.\u201dI hope you know the directory structure of\u00a0Shopware\u00a06 plugin, if you don\u2019t know, see here-\u00a0https:\/\/docs.shopware.com\/en\/shopware-platform-dev-en\/internals\/directory-structure. The purpose of custom field is used to add the additional information in the entity, so that we can used that information according to [...]","og_url":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2021-12-30T13:08:06+00:00","article_modified_time":"2021-12-30T13:08:09+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"Diwakar Rana","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Diwakar Rana","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/"},"author":{"name":"Diwakar Rana","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/4b025fe4ecbc5c0378cd13bb70da654f"},"headline":"How to config the custom field with default entity","datePublished":"2021-12-30T13:08:06+00:00","dateModified":"2021-12-30T13:08:09+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/"},"wordCount":363,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"articleSection":["Shopware"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/","url":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/","name":"How to config the custom field with default entity - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2021-12-30T13:08:06+00:00","dateModified":"2021-12-30T13:08:09+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-config-the-custom-field-with-default-entity\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to config the custom field with default entity"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/4b025fe4ecbc5c0378cd13bb70da654f","name":"Diwakar Rana","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/46482d0264c191ccd0337892016340a80ca4e4987a37f42514a0506aaee7e8dc?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/46482d0264c191ccd0337892016340a80ca4e4987a37f42514a0506aaee7e8dc?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Diwakar Rana"},"url":"https:\/\/webkul.com\/blog\/author\/diwakar-rana829\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/318278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/284"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=318278"}],"version-history":[{"count":1,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/318278\/revisions"}],"predecessor-version":[{"id":318299,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/318278\/revisions\/318299"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=318278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=318278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=318278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}