{"id":178,"date":"2020-09-19T14:02:20","date_gmt":"2020-09-19T08:32:20","guid":{"rendered":"https:\/\/www.codezma.com\/?p=178"},"modified":"2020-09-19T13:33:55","modified_gmt":"2020-09-19T08:03:55","slug":"condition-checking-in-laravel","status":"publish","type":"post","link":"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/","title":{"rendered":"Condition Checking In Laravel"},"content":{"rendered":"\n<p>Hello guys ! Today we are going to learn how we can easily apply where clauses in Laravel. We will also learn different techniques to check multiple condition. For example, how to check condition in query builder and many more things. This blog will help you to improve your coding style, reduce the lines of code and make your code more readable. Here I\u2019ll show normal techniques and advanced techniques to help you with it. So, let\u2019s begin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. <strong>Where X<\/strong><\/h2>\n\n\n\n<p>This is a magic method or also called as a dynamic method of Laravel where we can check conditions using column names. I know you are slightly confused but yes you can directly check the condition using column name. Let\u2019s take an example and see the results.<\/p>\n\n\n\n<p><strong>&nbsp;Old technique<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$user = User::where(\u2018name\u2019, \u2018alen\u2019)->get();<\/pre>\n\n\n\n<p><strong>New technique<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$user = User::whereName(\u2018alen\u2019)->get();<\/pre>\n\n\n\n<p>I know you guys are surprised but yes you can use this magic method to check the condition. Just write your column name in the title case with where method.&nbsp;<\/p>\n\n\n\n<p><strong>&nbsp;Syntax<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">whereColumnName(\u2018value-to-check\u2019);<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. <strong>When Method<\/strong><\/h2>\n\n\n\n<p>This is not an actual \u2018where\u2019 condition but this method will check the conditions. This is an eloquent technique where you can check parameters, column names etc. Let\u2019s take an example :<\/p>\n\n\n\n<p><strong>Old technique<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$users = User::where(\u2018active\u2019, \u2018y\u2019);\nif( $request->filter == \u2018date\u2019 ) {\n\t$users->where(\u2018date\u2019, $request->date);\n}\n\nif( $request->filter == \u2018time\u2019 ) {\n\t$users->where(time\u2019, $request->time);\n}\n\t\t$users = $users->get();<\/pre>\n\n\n\n<p><strong>New Technique<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$user = User::whereActive(\u2018y\u2019)\n\t\t->when($request->filter == \u2018date\u2019, function($query) use ($request) {\n\t\t$query->where(\u2018date\u2019, $request->date);\n})\nwhere($request->filter == \u2018time\u2019, function($query) use ($request){\n\t$query->where(\u2018time\u2019, $request->time);\n})->get();\n<\/pre>\n\n\n\n<p>Here we can also check the when condition with column name also you can check else condition by passing the second closure. For example, if we need to apply conditions based on users subscription like if a user is subscribed then minimum 100 points are required otherwise 300 points are required, then<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$users = User::whereActive(\u2018y\u2019)\n->when(subscribed\u2019 == \u2018y\u2019, function ($query) {\n\t$query->where(\u2018points\u2019, \u2018>=\u2019, 100);\n}, function($query){\n\t$query->where(\u2018points\u2019, \u2018>=\u2019, 300);\n});\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. <strong>Where &amp; OrWhere using closure<\/strong><\/h2>\n\n\n\n<p>This is a very common technique and I hope you guys are currently using this technique in your current development. Still, let\u2019s go with an example to get better clarity.<\/p>\n\n\n\n<p>To understand this technique we take an example like, user must be subscribed and either user\u2019s points are greater than 300 or user must be verified. So there on is the main condition and the rest of two vice versa.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$user = User::whereSubscribed(\u2018y\u2019)\n\t\t\t\t->where(function($query) {\n\t\t\t\t\t$query->where(\u2018points\u2019, \u2018>=\u2019, 300)\n\t\t\t\t\t\t->orWhere(\u2018verified\u2019, \u2018y\u2019);\n})->get();\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. <strong>Pre-defined whew method for date\/time&nbsp;<\/strong><\/h2>\n\n\n\n<p>There are&nbsp; 4 per-define methods to check date\/time in Laravel. These methods are only with date, date\/time and timestamp data-types.<\/p>\n\n\n\n<p><strong>Check complete date<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$date = Carbon::today()->subDays(15)->format(\u2018Y-m-d\u2019);\n$user = User::whereDate(\u2018created_at\u2019, $date)->get();<\/pre>\n\n\n\n<p><strong>Check by day<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$day = Carbon::today()->format(\u2018d\u2019);\n$user = User::whereDay(\u2018created_at\u2019, $day)->get();<\/pre>\n\n\n\n<p><strong>Check by month<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$month = Carbon::today()->format(\u2018m\u2019);\n$user = User::whereMonth(\u2018created_at\u2019, $month)->get();<\/pre>\n\n\n\n<p><strong>Check by year<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$year = Carbon::today()->format(\u2018y\u2019);\n$user = User::whereYear(\u2018created_at\u2019, $year)->get();<\/pre>\n\n\n\n<p>That\u2019s it for this blog. Hope you were able to learn some new techniques for conditioning.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello guys ! Today we are going to learn how we can easily apply where clauses in Laravel. We will also learn different techniques to check multiple condition. For example, how to check condition in query builder and many more things. This blog will help you to improve your coding style, reduce the lines of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":181,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[18,19,27,17],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Condition Checking In Laravel | Codezma<\/title>\n<meta name=\"description\" content=\"Multiple ways to check condition in laravel but if you want to make code more optimized, more readable then this blog explain the same ????\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Condition Checking In Laravel | Codezma\" \/>\n<meta property=\"og:description\" content=\"Multiple ways to check condition in laravel but if you want to make code more optimized, more readable then this blog explain the same ????\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/\" \/>\n<meta property=\"og:site_name\" content=\"Codezma\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-19T08:32:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-19T08:03:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codezma.com\/blogs\/wp-content\/uploads\/2020\/09\/condition-laravel-cover.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"768\" \/>\n\t<meta property=\"og:image:height\" content=\"285\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Rajnee Makwana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tech_codezma\" \/>\n<meta name=\"twitter:site\" content=\"@tech_codezma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rajnee Makwana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/\"},\"author\":{\"name\":\"Rajnee Makwana\",\"@id\":\"https:\/\/www.codezma.com\/blogs\/#\/schema\/person\/f0ab2c921dd8c3f8a95c6d3bb1d31eee\"},\"headline\":\"Condition Checking In Laravel\",\"datePublished\":\"2020-09-19T08:32:20+00:00\",\"dateModified\":\"2020-09-19T08:03:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/\"},\"wordCount\":393,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.codezma.com\/blogs\/#organization\"},\"keywords\":[\"backend\",\"best-practices\",\"Laravel\",\"webdevelopment\"],\"articleSection\":[\"Laravel\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/\",\"url\":\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/\",\"name\":\"Condition Checking In Laravel | Codezma\",\"isPartOf\":{\"@id\":\"https:\/\/www.codezma.com\/blogs\/#website\"},\"datePublished\":\"2020-09-19T08:32:20+00:00\",\"dateModified\":\"2020-09-19T08:03:55+00:00\",\"description\":\"Multiple ways to check condition in laravel but if you want to make code more optimized, more readable then this blog explain the same ????\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codezma.com\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Condition Checking In Laravel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codezma.com\/blogs\/#website\",\"url\":\"https:\/\/www.codezma.com\/blogs\/\",\"name\":\"Codezma\",\"description\":\"Encode the code\",\"publisher\":{\"@id\":\"https:\/\/www.codezma.com\/blogs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codezma.com\/blogs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codezma.com\/blogs\/#organization\",\"name\":\"Codezma\",\"url\":\"https:\/\/www.codezma.com\/blogs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codezma.com\/blogs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codezma.com\/blogs\/wp-content\/uploads\/2020\/08\/favicon.png\",\"contentUrl\":\"https:\/\/www.codezma.com\/blogs\/wp-content\/uploads\/2020\/08\/favicon.png\",\"width\":512,\"height\":512,\"caption\":\"Codezma\"},\"image\":{\"@id\":\"https:\/\/www.codezma.com\/blogs\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/twitter.com\/tech_codezma\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codezma.com\/blogs\/#\/schema\/person\/f0ab2c921dd8c3f8a95c6d3bb1d31eee\",\"name\":\"Rajnee Makwana\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codezma.com\/blogs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c24187f3486a406a1f26873a22cacf4b?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c24187f3486a406a1f26873a22cacf4b?s=96&r=g\",\"caption\":\"Rajnee Makwana\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Condition Checking In Laravel | Codezma","description":"Multiple ways to check condition in laravel but if you want to make code more optimized, more readable then this blog explain the same ????","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:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/","og_locale":"en_US","og_type":"article","og_title":"Condition Checking In Laravel | Codezma","og_description":"Multiple ways to check condition in laravel but if you want to make code more optimized, more readable then this blog explain the same ????","og_url":"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/","og_site_name":"Codezma","article_published_time":"2020-09-19T08:32:20+00:00","article_modified_time":"2020-09-19T08:03:55+00:00","og_image":[{"width":768,"height":285,"url":"https:\/\/www.codezma.com\/blogs\/wp-content\/uploads\/2020\/09\/condition-laravel-cover.jpg","type":"image\/jpeg"}],"author":"Rajnee Makwana","twitter_card":"summary_large_image","twitter_creator":"@tech_codezma","twitter_site":"@tech_codezma","twitter_misc":{"Written by":"Rajnee Makwana","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/#article","isPartOf":{"@id":"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/"},"author":{"name":"Rajnee Makwana","@id":"https:\/\/www.codezma.com\/blogs\/#\/schema\/person\/f0ab2c921dd8c3f8a95c6d3bb1d31eee"},"headline":"Condition Checking In Laravel","datePublished":"2020-09-19T08:32:20+00:00","dateModified":"2020-09-19T08:03:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/"},"wordCount":393,"commentCount":0,"publisher":{"@id":"https:\/\/www.codezma.com\/blogs\/#organization"},"keywords":["backend","best-practices","Laravel","webdevelopment"],"articleSection":["Laravel"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/","url":"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/","name":"Condition Checking In Laravel | Codezma","isPartOf":{"@id":"https:\/\/www.codezma.com\/blogs\/#website"},"datePublished":"2020-09-19T08:32:20+00:00","dateModified":"2020-09-19T08:03:55+00:00","description":"Multiple ways to check condition in laravel but if you want to make code more optimized, more readable then this blog explain the same ????","breadcrumb":{"@id":"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.codezma.com\/blogs\/laravel\/condition-checking-in-laravel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codezma.com\/blogs\/"},{"@type":"ListItem","position":2,"name":"Condition Checking In Laravel"}]},{"@type":"WebSite","@id":"https:\/\/www.codezma.com\/blogs\/#website","url":"https:\/\/www.codezma.com\/blogs\/","name":"Codezma","description":"Encode the code","publisher":{"@id":"https:\/\/www.codezma.com\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codezma.com\/blogs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codezma.com\/blogs\/#organization","name":"Codezma","url":"https:\/\/www.codezma.com\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codezma.com\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/www.codezma.com\/blogs\/wp-content\/uploads\/2020\/08\/favicon.png","contentUrl":"https:\/\/www.codezma.com\/blogs\/wp-content\/uploads\/2020\/08\/favicon.png","width":512,"height":512,"caption":"Codezma"},"image":{"@id":"https:\/\/www.codezma.com\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/twitter.com\/tech_codezma"]},{"@type":"Person","@id":"https:\/\/www.codezma.com\/blogs\/#\/schema\/person\/f0ab2c921dd8c3f8a95c6d3bb1d31eee","name":"Rajnee Makwana","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codezma.com\/blogs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c24187f3486a406a1f26873a22cacf4b?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c24187f3486a406a1f26873a22cacf4b?s=96&r=g","caption":"Rajnee Makwana"}}]}},"_links":{"self":[{"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/posts\/178"}],"collection":[{"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":3,"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":184,"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/posts\/178\/revisions\/184"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/media\/181"}],"wp:attachment":[{"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codezma.com\/blogs\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}