{"id":1977,"date":"2022-12-10T10:30:40","date_gmt":"2022-12-10T10:30:40","guid":{"rendered":"https:\/\/infyblog.zluck.in\/?p=1977"},"modified":"2025-07-17T05:32:43","modified_gmt":"2025-07-17T05:32:43","slug":"laravel-hasonethough-laravel-hasmanythough-relationships","status":"publish","type":"post","link":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/","title":{"rendered":"Laravel hasOneThough &#038; Laravel hasManyThough Relationships"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1977\" class=\"elementor elementor-1977\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c9b8132 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c9b8132\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3b650b8\" data-id=\"3b650b8\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\n\t\t<div class=\"elementor-element elementor-element-8400f82 elementor-widget elementor-widget-text-editor\" data-id=\"8400f82\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h2>Laravel HasOneTHough &amp; Laravel HasManyThough Relationships<\/h2><p>We generally know about the 4 basics\u00a0<a href=\"https:\/\/laravel.com\/docs\/9.x\/eloquent-relationships\" target=\"_blank\" rel=\"noopener\">Laravel Relations<\/a>\u00a0ships that laravel provides:<\/p><p>\u00a0<\/p><ul><li><a href=\"https:\/\/laravel.com\/docs\/9.x\/eloquent-relationships#one-to-one\" target=\"_blank\" rel=\"noopener\">HasOne<\/a><\/li><li><a href=\"https:\/\/laravel.com\/docs\/9.x\/eloquent-relationships#one-to-many\" target=\"_blank\" rel=\"noopener\">HasMany<\/a><\/li><li><a href=\"https:\/\/laravel.com\/docs\/9.x\/eloquent-relationships#one-to-many-inverse\" target=\"_blank\" rel=\"noopener\">BelongsTo<\/a><\/li><li><a href=\"https:\/\/laravel.com\/docs\/9.x\/eloquent-relationships#many-to-many\" target=\"_blank\" rel=\"noopener\">BelongsToMany<\/a><\/li><\/ul><p>\u00a0<\/p><p>Now we are going to see the major missing relationships that we are thinking are &#8220;Hard to use&#8221;, but in real cases, it&#8217;s needed while developing a project.<\/p><p>\u00a0<\/p><p>Even though I was thinking that HasOneThough and HasManyThough Relationships were will be hard to understand, I was wrong. it&#8217;s really easy to understand.<\/p><p>\u00a0<\/p><h2>Understanding HasOneThough<\/h2><p>Let&#8217;s say there is a Library that wants to know the book issuer&#8217;s name directly, in this case, we generally do :<\/p><p>\u00a0<\/p><ul><li>Fetch Books<\/li><li>Fetch its related issuer by using the HasOne Relation<\/li><\/ul><p>\u00a0<\/p><p>What if I say I can directly access the issuer name into the Library model, yes we can achieve this by using the has one though.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-21d20fc elementor-widget elementor-widget-code-highlight\" data-id=\"21d20fc\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Library\r\n- id\r\n- name\r\n\r\nBook\r\n- id\r\n- name\r\n- library_id\r\n\r\nIssuer\r\n- id\r\n- name\r\n- book_id<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3078e8f elementor-widget elementor-widget-code-highlight\" data-id=\"3078e8f\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>public function issuer() {\r\n    return hasOneThough(App\\Issuer, App\\Book, library_id, book_id)\r\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7ffef75 elementor-widget elementor-widget-text-editor\" data-id=\"7ffef75\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h2>Understanding HasManyThough<\/h2><p>Let&#8217;s say in the same example that there are multiple issuers of the same books, we can achieve it as follow.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-701a19d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"701a19d\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-082ea60\" data-id=\"082ea60\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-505b0b2 elementor-widget elementor-widget-code-highlight\" data-id=\"505b0b2\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>public function issuer() {\r\n    return hasManyThough(App\\Issuer, App\\Book, library_id, book_id)\r\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-512e55c elementor-widget elementor-widget-text-editor\" data-id=\"512e55c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Hope it will be helpful.<\/p><p>\u00a0<\/p><p>Thanks<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>Laravel HasOneTHough &amp; Laravel HasManyThough Relationships We generally know about the 4 basics\u00a0Laravel&#8230;<\/p>\n","protected":false},"author":2,"featured_media":1979,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"postBodyCss":"","postBodyMargin":[],"postBodyPadding":[],"postBodyBackground":{"backgroundType":"classic","gradient":""},"two_page_speed":[],"footnotes":""},"categories":[9],"tags":[19,14],"class_list":["post-1977","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-laravel","tag-learning","tag-tips"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Laravel hasOneThough &amp; Laravel hasManyThough Relationships<\/title>\n<meta name=\"description\" content=\"Master Laravel\u2019s hasOneThrough &amp; hasManyThrough relationships, how they work, use cases, model setup, and query examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Laravel hasOneThough &amp; Laravel hasManyThough Relationships\" \/>\n<meta property=\"og:description\" content=\"Master Laravel\u2019s hasOneThrough &amp; hasManyThrough relationships, how they work, use cases, model setup, and query examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog | InfyOm Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/infyom\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-10T10:30:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-17T05:32:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png\" \/>\n\t<meta property=\"og:image:width\" content=\"772\" \/>\n\t<meta property=\"og:image:height\" content=\"484\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"InfyOm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InfyOm\" \/>\n<meta name=\"twitter:site\" content=\"@InfyOm\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InfyOm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/\"},\"author\":{\"name\":\"InfyOm\",\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/person\/659bfc844c333d041221e83c5f5ec754\"},\"headline\":\"Laravel hasOneThough &#038; Laravel hasManyThough Relationships\",\"datePublished\":\"2022-12-10T10:30:40+00:00\",\"dateModified\":\"2025-07-17T05:32:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/\"},\"wordCount\":173,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/infyom.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png\",\"keywords\":[\"Learning\",\"Tips\"],\"articleSection\":[\"Laravel\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/\",\"url\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/\",\"name\":\"Laravel hasOneThough & Laravel hasManyThough Relationships\",\"isPartOf\":{\"@id\":\"https:\/\/infyom.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png\",\"datePublished\":\"2022-12-10T10:30:40+00:00\",\"dateModified\":\"2025-07-17T05:32:43+00:00\",\"description\":\"Master Laravel\u2019s hasOneThrough & hasManyThrough relationships, how they work, use cases, model setup, and query examples.\",\"breadcrumb\":{\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#primaryimage\",\"url\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png\",\"contentUrl\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png\",\"width\":772,\"height\":484,\"caption\":\"Laravel hasOneThough & Laravel hasManyThough Relationships\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/infyom.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Laravel hasOneThough &#038; Laravel hasManyThough Relationships\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/infyom.com\/blog\/#website\",\"url\":\"https:\/\/infyom.com\/blog\/\",\"name\":\"Blog | InfyOm Technologies\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/infyom.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/infyom.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/infyom.com\/blog\/#organization\",\"name\":\"InfyOm Technologies\",\"url\":\"https:\/\/infyom.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/InfyOm-Logo.png\",\"contentUrl\":\"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/InfyOm-Logo.png\",\"width\":88,\"height\":41,\"caption\":\"InfyOm Technologies\"},\"image\":{\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/infyom\",\"https:\/\/x.com\/InfyOm\",\"https:\/\/www.instagram.com\/infyomtechnologies\/\",\"https:\/\/in.linkedin.com\/company\/infyom-technologies\",\"https:\/\/github.com\/infyomlabs\",\"https:\/\/x.com\/infyom\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/person\/659bfc844c333d041221e83c5f5ec754\",\"name\":\"InfyOm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/infyom.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1ad162864d8d33c04ea9e6d0333cc483?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1ad162864d8d33c04ea9e6d0333cc483?s=96&d=mm&r=g\",\"caption\":\"InfyOm\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Laravel hasOneThough & Laravel hasManyThough Relationships","description":"Master Laravel\u2019s hasOneThrough & hasManyThrough relationships, how they work, use cases, model setup, and query examples.","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:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/","og_locale":"en_US","og_type":"article","og_title":"Laravel hasOneThough & Laravel hasManyThough Relationships","og_description":"Master Laravel\u2019s hasOneThrough & hasManyThrough relationships, how they work, use cases, model setup, and query examples.","og_url":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/","og_site_name":"Blog | InfyOm Technologies","article_publisher":"https:\/\/www.facebook.com\/infyom","article_published_time":"2022-12-10T10:30:40+00:00","article_modified_time":"2025-07-17T05:32:43+00:00","og_image":[{"width":772,"height":484,"url":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png","type":"image\/png"}],"author":"InfyOm","twitter_card":"summary_large_image","twitter_creator":"@InfyOm","twitter_site":"@InfyOm","twitter_misc":{"Written by":"InfyOm","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#article","isPartOf":{"@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/"},"author":{"name":"InfyOm","@id":"https:\/\/infyom.com\/blog\/#\/schema\/person\/659bfc844c333d041221e83c5f5ec754"},"headline":"Laravel hasOneThough &#038; Laravel hasManyThough Relationships","datePublished":"2022-12-10T10:30:40+00:00","dateModified":"2025-07-17T05:32:43+00:00","mainEntityOfPage":{"@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/"},"wordCount":173,"commentCount":0,"publisher":{"@id":"https:\/\/infyom.com\/blog\/#organization"},"image":{"@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#primaryimage"},"thumbnailUrl":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png","keywords":["Learning","Tips"],"articleSection":["Laravel"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/","url":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/","name":"Laravel hasOneThough & Laravel hasManyThough Relationships","isPartOf":{"@id":"https:\/\/infyom.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#primaryimage"},"image":{"@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#primaryimage"},"thumbnailUrl":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png","datePublished":"2022-12-10T10:30:40+00:00","dateModified":"2025-07-17T05:32:43+00:00","description":"Master Laravel\u2019s hasOneThrough & hasManyThrough relationships, how they work, use cases, model setup, and query examples.","breadcrumb":{"@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#primaryimage","url":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png","contentUrl":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/laravel-hasonethough-laravel-hasmanythough-relationships.png","width":772,"height":484,"caption":"Laravel hasOneThough & Laravel hasManyThough Relationships"},{"@type":"BreadcrumbList","@id":"https:\/\/infyom.com\/blog\/laravel-hasonethough-laravel-hasmanythough-relationships\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/infyom.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Laravel hasOneThough &#038; Laravel hasManyThough Relationships"}]},{"@type":"WebSite","@id":"https:\/\/infyom.com\/blog\/#website","url":"https:\/\/infyom.com\/blog\/","name":"Blog | InfyOm Technologies","description":"","publisher":{"@id":"https:\/\/infyom.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/infyom.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/infyom.com\/blog\/#organization","name":"InfyOm Technologies","url":"https:\/\/infyom.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/infyom.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/InfyOm-Logo.png","contentUrl":"https:\/\/infyom.com\/blog\/wp-content\/uploads\/2024\/06\/InfyOm-Logo.png","width":88,"height":41,"caption":"InfyOm Technologies"},"image":{"@id":"https:\/\/infyom.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/infyom","https:\/\/x.com\/InfyOm","https:\/\/www.instagram.com\/infyomtechnologies\/","https:\/\/in.linkedin.com\/company\/infyom-technologies","https:\/\/github.com\/infyomlabs","https:\/\/x.com\/infyom"]},{"@type":"Person","@id":"https:\/\/infyom.com\/blog\/#\/schema\/person\/659bfc844c333d041221e83c5f5ec754","name":"InfyOm","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/infyom.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1ad162864d8d33c04ea9e6d0333cc483?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ad162864d8d33c04ea9e6d0333cc483?s=96&d=mm&r=g","caption":"InfyOm"}}]}},"_links":{"self":[{"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/posts\/1977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/comments?post=1977"}],"version-history":[{"count":7,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/posts\/1977\/revisions"}],"predecessor-version":[{"id":8097,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/posts\/1977\/revisions\/8097"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/media\/1979"}],"wp:attachment":[{"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/media?parent=1977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/categories?post=1977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infyom.com\/blog\/wp-json\/wp\/v2\/tags?post=1977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}