{"id":318728,"date":"2022-01-09T12:58:48","date_gmt":"2022-01-09T12:58:48","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=318728"},"modified":"2022-01-09T13:35:06","modified_gmt":"2022-01-09T13:35:06","slug":"how-to-create-console-command-in-symfony","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/","title":{"rendered":"How to create console command in Symfony"},"content":{"rendered":"\n<p>Today we are going to learn to create symfony commands. You must have already used many symfony console commands. i.e. <strong><em>bin\/console list doctrine<\/em><\/strong> or <strong><em>bin\/console clear:cache<\/em><\/strong><\/p>\n\n\n\n<p>Sometimes we need to create our own commands and need to execute our custom code through the symfony command.<\/p>\n\n\n\n<p>So lets start learning symfony commands. we will do it step by step.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create class for the Command<\/h3>\n\n\n\n<p>We have to create the class for the command under <strong>src\/Command\/<\/strong> directory.<br>Lets create our class for custom command <strong>src\/Command\/CustomCommand.php<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h6 class=\"font-size:12px; wp-block-heading\">#<em>Code for class of command<\/em><\/h6>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/\/ src\/Command\/CustomCommand.php\n\n&lt;?php\n\nnamespace App\\Command;\n\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\n\nclass CreateUserCommand extends Command\n{\n    \/\/ In this function set the name, description and help hint for the command\n    protected function configure(): void\n    {\n        \/\/ Use in-build functions to set name, description and help\n\n        $this-&gt;setName(&#039;my-custom-command&#039;)\n            -&gt;setDescription(&#039;This command runs your custom task&#039;)\n            -&gt;setHelp(&#039;Run this command to execute your custom tasks in the execute function.&#039;)\n            -&gt;addArgument(&#039;param&#039;, InputArgument::REQUIRED, &#039;Pass the parameter.&#039;);\n    }\n\n    \/\/ write the code you want to execute when command runs\n    protected function execute(InputInterface $input, OutputInterface $output): int\n    {\n        \/\/ If you want to write some output\n        $output-&gt;writeln(&#039;Pass the parameter&#039; . $input-&gt;getArgument(&#039;param&#039;));\n\n        \/\/ Return below values according to the occurred situation\n\n        if (SUCCESSFUL_EXECUTION_CONDITION) {\n\n            \/\/ if everything is executed successfully with no issues then return SUCCESS as below\n            return Command::SUCCESS;\n\n        } elseif (EXECUTION_FAILURE_CONDITION) {\n\n            \/\/ if execution fails return FAILURE as below\n            return Command::FAILURE;\n\n        } elseif (INVALID_EXECUTION_CONDITION) {\n\n            \/\/ if invalid things happens i.e. invalid arguments etc. then return INVALID as below\n            return Command::INVALID\n\n        }\n    }\n}<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Lets understand the components in the command class &#8211;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Included namespaces<\/h3>\n\n\n\n<p><strong>use Symfony\\Component\\Console\\Command\\Command;<\/strong><br>Every custom command class must extend the Command class for working. So use Command class namespace in commad php file.<\/p>\n\n\n\n<p><strong>use Symfony\\Component\\Console\\Input\\InputInterface;<br>use Symfony\\Component\\Console\\Output\\OutputInterface;<\/strong><br>Above two classes are used for input and output operations while executing the custom commands. See the <a href=\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/#console_execute_f\">execute()<\/a> function how these classes and used in the class parameters and used inside the function for input\/output operations.<\/p>\n\n\n\n<p><strong>use Symfony\\Component\\Console\\Input\\InputArgument;<\/strong><br>Include this class when you have to pass any argument while executing the command. See the <a href=\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/#console_configure_f\">configure()<\/a> function how &#8216;param&#8217; is set as a required argument.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"console_configure_f\">configure() function<\/h3>\n\n\n\n<p>This function is used to set configurations for the console command.<br>In this function you can set the configurations like name, description and help hint for the console command.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/\/ In this function set the name, description and help hint for the command\nprotected function configure(): void\n{\n    \/\/ Use in-build functions to set name, description and help\n\n    $this-&gt;setName(&#039;my-custom-command&#039;)\n        -&gt;setDescription(&#039;This command runs your custom task&#039;)\n        -&gt;setHelp(&#039;Run this command to execute your custom tasks in the execute function.&#039;)\n        -&gt;addArgument(&#039;param&#039;, InputArgument::REQUIRED, &#039;Pass the parameter.&#039;);\n}<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"console_execute_f\">execute() function<\/h3>\n\n\n\n<p>In this function, write the code to be executed on running the created console command.<\/p>\n\n\n\n<p>You can return the constants according to the code execution conditions :<br><strong><em>Command::SUCCESS<\/em><\/strong> : if successful execution<br><strong><em>Command::FAILURE<\/em><\/strong> : if execution fails<br><strong><em>Command::INVALID<\/em><\/strong> : if invalid execution (i.e. invalid arguments etc.)<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/\/ write the code you want to execute when command runs\nprotected function execute(InputInterface $input, OutputInterface $output): int\n{\n    \/\/ If you want to write some output\n    $output-&gt;writeln(&#039;Pass the parameter&#039; . $input-&gt;getArgument(&#039;param&#039;));\n\n    \/\/ Return below values according to the occurred situation\n\n    if (SUCCESSFUL_EXECUTION_CONDITION) {\n\n        \/\/ if everything is executed successfully with no issues then return SUCCESS as below\n        return Command::SUCCESS;\n\n    } elseif (EXECUTION_FAILURE_CONDITION) {\n\n        \/\/ if execution fails return FAILURE as below\n        return Command::FAILURE;\n\n    } elseif (INVALID_EXECUTION_CONDITION) {\n\n        \/\/ if invalid things happens i.e. invalid arguments etc. then return INVALID as below\n        return Command::INVALID\n\n    }\n}<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>In Symfony, Console commands are registered as services. All commands have <strong>console.command<\/strong> tag.<br>in the default <strong>services.yml<\/strong> configuration file commands are registered automatically by autoconfigurations.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Command Execution<\/h3>\n\n\n\n<p>After configuring and registering the command, you can run it in the terminal:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">php bin\/console my-custom-command<\/pre>\n\n\n\n<p>As soon as you run your command on console, the code written in the execute() function will be executed.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>So this is how you can create and execute the console command in symfony.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>You can also use these console commands to run cron jobs in symfony.<\/strong><\/p>\n\n\n\n<p>Below is an example to run a cron job using the symfony command :<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">* * * * root \/usr\/bin\/php \/path\/to\/bin\/console command:to:execute<\/pre>\n\n\n\n<p>Hope this blog will help you in future development in symfony.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>reference : <a href=\"https:\/\/symfony.com\/doc\/current\/console.html\" target=\"_blank\" rel=\"noreferrer noopener\">symfony console commands<\/a><\/p>\n\n\n\n<p>Happy coding. \ud83d\ude42<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we are going to learn to create symfony commands. You must have already used many symfony console commands. i.e. bin\/console list doctrine or bin\/console clear:cache Sometimes we need to create our own commands and need to execute our custom code through the symfony command. So lets start learning symfony commands. we will do it <a href=\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":83,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12294,2710,12296,12295],"class_list":["post-318728","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-conosle-commands","tag-symfony","tag-symfony-commands","tag-symfony-console-command"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to create console command in Symfony - Webkul Blog<\/title>\n<meta name=\"description\" content=\"Learn how to create Symfony console commands. Learn about the structure of command classses, configurations and execution of console commands.\" \/>\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-create-console-command-in-symfony\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create console command in Symfony - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how to create Symfony console commands. Learn about the structure of command classses, configurations and execution of console commands.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/\" \/>\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=\"2022-01-09T12:58:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-09T13:35:06+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=\"Sumit\" \/>\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=\"Sumit\" \/>\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-create-console-command-in-symfony\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/\"},\"author\":{\"name\":\"Sumit\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3e45ec35749afa62aa598a5e1766d2b9\"},\"headline\":\"How to create console command in Symfony\",\"datePublished\":\"2022-01-09T12:58:48+00:00\",\"dateModified\":\"2022-01-09T13:35:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/\"},\"wordCount\":418,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"keywords\":[\"conosle commands\",\"symfony\",\"symfony commands\",\"symfony console command\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/\",\"name\":\"How to create console command in Symfony - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2022-01-09T12:58:48+00:00\",\"dateModified\":\"2022-01-09T13:35:06+00:00\",\"description\":\"Learn how to create Symfony console commands. Learn about the structure of command classses, configurations and execution of console commands.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create console command in Symfony\"}]},{\"@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\/3e45ec35749afa62aa598a5e1766d2b9\",\"name\":\"Sumit\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0e50336dc34ad31135238f210897d19d09edbdb9be2f7974a85de3ecdef16bf6?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\/0e50336dc34ad31135238f210897d19d09edbdb9be2f7974a85de3ecdef16bf6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sumit\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/sumit201\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create console command in Symfony - Webkul Blog","description":"Learn how to create Symfony console commands. Learn about the structure of command classses, configurations and execution of console commands.","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-create-console-command-in-symfony\/","og_locale":"en_US","og_type":"article","og_title":"How to create console command in Symfony - Webkul Blog","og_description":"Learn how to create Symfony console commands. Learn about the structure of command classses, configurations and execution of console commands.","og_url":"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2022-01-09T12:58:48+00:00","article_modified_time":"2022-01-09T13:35:06+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":"Sumit","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sumit","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/"},"author":{"name":"Sumit","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3e45ec35749afa62aa598a5e1766d2b9"},"headline":"How to create console command in Symfony","datePublished":"2022-01-09T12:58:48+00:00","dateModified":"2022-01-09T13:35:06+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/"},"wordCount":418,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"keywords":["conosle commands","symfony","symfony commands","symfony console command"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/","url":"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/","name":"How to create console command in Symfony - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2022-01-09T12:58:48+00:00","dateModified":"2022-01-09T13:35:06+00:00","description":"Learn how to create Symfony console commands. Learn about the structure of command classses, configurations and execution of console commands.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-create-console-command-in-symfony\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to create console command in Symfony"}]},{"@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\/3e45ec35749afa62aa598a5e1766d2b9","name":"Sumit","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0e50336dc34ad31135238f210897d19d09edbdb9be2f7974a85de3ecdef16bf6?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\/0e50336dc34ad31135238f210897d19d09edbdb9be2f7974a85de3ecdef16bf6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sumit"},"url":"https:\/\/webkul.com\/blog\/author\/sumit201\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/318728","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\/83"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=318728"}],"version-history":[{"count":30,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/318728\/revisions"}],"predecessor-version":[{"id":319300,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/318728\/revisions\/319300"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=318728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=318728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=318728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}