[{"data":1,"prerenderedAt":609},["ShallowReactive",2],{"libs":3,"navigation-laravel-json-api":115,"\u002Flaravel-json-api\u002Frequests\u002Fincludes-and-fieldsets":294,"\u002Flaravel-json-api\u002Frequests\u002Fincludes-and-fieldsets-surround":604},[4,45,69,95],{"id":5,"color":6,"compatibility":7,"extension":20,"icon":21,"links":22,"meta":27,"name":28,"order":29,"package":30,"related":31,"stem":34,"tagline":35,"__hash__":36,"slug":37,"repository":38,"branch":39,"path":40,"collection":41,"entry":42,"home":43,"version":44},"laravel_json_api_meta\u002Fdocs\u002Fsite\u002Flib.yml","violet",[8,13,16],{"version":9,"php":10,"laravel":11,"status":12},"3.x","^8.3","^12.46 || ^13.0","active",{"version":14,"php":10,"laravel":11,"status":15},"2.x","eol",{"version":17,"php":18,"laravel":19,"status":15},"1.x","^8.1","^10.0 || ^11.0 || ^12.0 || ^13.0","yml","i-lucide-braces",[23],{"label":24,"to":25,"icon":26},"JSON:API 1.1","https:\u002F\u002Fjsonapi.org\u002Fformat\u002F","i-lucide-book-marked",{},"Laravel JSON:API",10,"ark4ne\u002Flaravel-json-api",[32,33],"laravel-api-revisions","laravel-openapi-generator","docs\u002Fsite\u002Flib","JSON:API 1.1 resources for Laravel, with typed values, validated includes and fieldsets, and API revisions.","ILGoVp9rzKYDQc18VV8kkXy3EQOQ8rv87JblFKXYDrU","laravel-json-api","Ark4ne\u002Flaravel-json-api","master","docs\u002Fsite","laravel_json_api","\u002Flaravel-json-api\u002Fgetting-started\u002Fintroduction","\u002Flaravel-json-api","v3.0.0",{"id":46,"color":47,"compatibility":48,"extension":20,"icon":50,"links":51,"meta":56,"name":57,"order":58,"package":59,"related":60,"stem":34,"tagline":61,"__hash__":62,"slug":32,"repository":63,"branch":64,"path":40,"collection":65,"entry":66,"home":67,"version":68},"laravel_api_revisions_meta\u002Fdocs\u002Fsite\u002Flib.yml","amber",[49],{"version":17,"php":10,"laravel":11,"status":12},"i-lucide-git-branch",[52],{"label":53,"to":54,"icon":55},"Agent skill","https:\u002F\u002Fgithub.com\u002FArk4ne\u002Flaravel-api-revisions\u002Ftree\u002Fmain\u002Fskills\u002Flaravel-api-revisions","i-lucide-bot",{},"Laravel API Revisions",20,"ark4ne\u002Flaravel-api-revisions",[37,33],"Typed schemas for Laravel resources and form requests, evolved through dated API revisions, Stripe-style.","w24MBVK4_XliIZ8nVcfnuT9OgR-m-Ytxz31Pxua_mLM","Ark4ne\u002Flaravel-api-revisions","main","laravel_api_revisions","\u002Flaravel-api-revisions\u002Fgetting-started\u002Fintroduction","\u002Flaravel-api-revisions","v1.0.0",{"id":70,"color":71,"compatibility":72,"extension":20,"icon":77,"links":78,"meta":82,"name":83,"order":84,"package":85,"related":86,"stem":34,"tagline":88,"__hash__":89,"slug":33,"repository":90,"branch":39,"path":40,"collection":91,"entry":92,"home":93,"version":94},"laravel_openapi_generator_meta\u002Fdocs\u002Fsite\u002Flib.yml","emerald",[73,75],{"version":17,"php":10,"laravel":74,"status":12},"^13.0",{"version":76,"php":18,"laravel":19,"status":15},"0.6","i-lucide-file-json",[79],{"label":80,"to":81,"icon":26},"OpenAPI Specification","https:\u002F\u002Fspec.openapis.org\u002Foas\u002Flatest.html",{},"Laravel OpenAPI Generator",30,"ark4ne\u002Flaravel-openapi-generator",[87,37,32],"openapi-writer","Generates OpenAPI 3.0, 3.1 and 3.2 documents from a Laravel application, its routes, form requests and resources.","DTt0SVqegMImLmWmwL8LCW5lxRCWFYcnBFOaquLpVwc","Ark4ne\u002Flaravel-openapi-generator","laravel_openapi_generator","\u002Flaravel-openapi-generator\u002Fgetting-started\u002Fintroduction","\u002Flaravel-openapi-generator","v1.2.0",{"id":96,"color":97,"compatibility":98,"extension":20,"icon":101,"links":102,"meta":104,"name":105,"order":106,"package":107,"related":108,"stem":34,"tagline":109,"__hash__":110,"slug":87,"repository":111,"branch":64,"path":40,"collection":112,"entry":113,"home":114,"version":68},"openapi_writer_meta\u002Fdocs\u002Fsite\u002Flib.yml","sky",[99],{"version":17,"php":100,"status":12},"^8.2","i-lucide-file-pen-line",[103],{"label":80,"to":81,"icon":26},{},"OpenAPI Writer",40,"ark4ne\u002Fopenapi-writer",[33],"Framework-agnostic, fluent and immutable PHP builder for OpenAPI 3.0, 3.1 and 3.2 documents, written as JSON or YAML and validated.","JFQcdQ9GEChOkfRKibLjoxZOfnt6HYNsayX2melOzMk","Ark4ne\u002Fopenapi-writer","openapi_writer","\u002Fopenapi-writer\u002Fgetting-started\u002Fintroduction","\u002Fopenapi-writer",[116,135,165,187,216,234,248,282],{"title":117,"since":118,"experimental":119,"icon":120,"path":121,"stem":122,"children":123,"page":119},"Getting started",null,false,"i-lucide-rocket","\u002Flaravel-json-api\u002Fgetting-started","laravel-json-api\u002F1.getting-started",[124,127,131],{"title":125,"path":42,"stem":126,"since":118,"experimental":119},"Introduction","laravel-json-api\u002F1.getting-started\u002F1.introduction",{"title":128,"path":129,"stem":130,"since":118,"experimental":119},"Installation","\u002Flaravel-json-api\u002Fgetting-started\u002Finstallation","laravel-json-api\u002F1.getting-started\u002F2.installation",{"title":132,"path":133,"stem":134,"since":118,"experimental":119},"Quick start","\u002Flaravel-json-api\u002Fgetting-started\u002Fquick-start","laravel-json-api\u002F1.getting-started\u002F3.quick-start",{"title":136,"since":118,"experimental":119,"icon":137,"path":138,"stem":139,"children":140,"page":119},"Resources","i-lucide-box","\u002Flaravel-json-api\u002Fresources","laravel-json-api\u002F2.resources",[141,145,149,153,157,161],{"title":142,"path":143,"stem":144,"since":118,"experimental":119},"Anatomy of a resource","\u002Flaravel-json-api\u002Fresources\u002Fanatomy","laravel-json-api\u002F2.resources\u002F1.anatomy",{"title":146,"path":147,"stem":148,"since":118,"experimental":119},"Attributes & values","\u002Flaravel-json-api\u002Fresources\u002Fattributes","laravel-json-api\u002F2.resources\u002F2.attributes",{"title":150,"path":151,"stem":152,"since":118,"experimental":119},"Conditions","\u002Flaravel-json-api\u002Fresources\u002Fconditions","laravel-json-api\u002F2.resources\u002F3.conditions",{"title":154,"path":155,"stem":156,"since":118,"experimental":119},"Relationships","\u002Flaravel-json-api\u002Fresources\u002Frelationships","laravel-json-api\u002F2.resources\u002F4.relationships",{"title":158,"path":159,"stem":160,"since":118,"experimental":119},"Links & meta","\u002Flaravel-json-api\u002Fresources\u002Flinks-and-meta","laravel-json-api\u002F2.resources\u002F5.links-and-meta",{"title":162,"path":163,"stem":164,"since":118,"experimental":119},"Collections & pagination","\u002Flaravel-json-api\u002Fresources\u002Fcollections","laravel-json-api\u002F2.resources\u002F6.collections",{"title":166,"since":118,"experimental":119,"icon":167,"path":168,"stem":169,"children":170,"page":119},"Requests","i-lucide-arrow-down-up","\u002Flaravel-json-api\u002Frequests","laravel-json-api\u002F3.requests",[171,175,179,183],{"title":172,"path":173,"stem":174,"since":118,"experimental":119},"Includes & sparse fieldsets","\u002Flaravel-json-api\u002Frequests\u002Fincludes-and-fieldsets","laravel-json-api\u002F3.requests\u002F1.includes-and-fieldsets",{"title":176,"path":177,"stem":178,"since":118,"experimental":119},"Validating requests","\u002Flaravel-json-api\u002Frequests\u002Fvalidation","laravel-json-api\u002F3.requests\u002F2.validation",{"title":180,"path":181,"stem":182,"since":118,"experimental":119},"Write requests","\u002Flaravel-json-api\u002Frequests\u002Fwrite-requests","laravel-json-api\u002F3.requests\u002F3.write-requests",{"title":184,"path":185,"stem":186,"since":118,"experimental":119},"Errors & content negotiation","\u002Flaravel-json-api\u002Frequests\u002Ferrors","laravel-json-api\u002F3.requests\u002F4.errors",{"title":188,"since":118,"experimental":119,"icon":50,"path":189,"stem":190,"children":191,"page":119},"API revisions","\u002Flaravel-json-api\u002Frevisions","laravel-json-api\u002F4.revisions",[192,196,200,204,208,212],{"title":193,"path":194,"stem":195,"since":118,"experimental":119},"Overview & declaring revisions","\u002Flaravel-json-api\u002Frevisions\u002Foverview","laravel-json-api\u002F4.revisions\u002F1.overview",{"title":197,"path":198,"stem":199,"since":118,"experimental":119},"Changing a field","\u002Flaravel-json-api\u002Frevisions\u002Fchanging-a-field","laravel-json-api\u002F4.revisions\u002F2.changing-a-field",{"title":201,"path":202,"stem":203,"since":118,"experimental":119},"Adding, removing, new types","\u002Flaravel-json-api\u002Frevisions\u002Fadding-and-removing","laravel-json-api\u002F4.revisions\u002F3.adding-and-removing",{"title":205,"path":206,"stem":207,"since":118,"experimental":119},"Guards","\u002Flaravel-json-api\u002Frevisions\u002Fguards","laravel-json-api\u002F4.revisions\u002F4.guards",{"title":209,"path":210,"stem":211,"since":118,"experimental":119},"Write requests across revisions","\u002Flaravel-json-api\u002Frevisions\u002Fwrite-requests","laravel-json-api\u002F4.revisions\u002F5.write-requests",{"title":213,"path":214,"stem":215,"since":118,"experimental":119},"Checking & retiring a revision","\u002Flaravel-json-api\u002Frevisions\u002Fchecking-and-retiring","laravel-json-api\u002F4.revisions\u002F6.checking-and-retiring",{"title":217,"since":118,"experimental":119,"icon":218,"path":219,"stem":220,"children":221,"page":119},"Tooling","i-lucide-wrench","\u002Flaravel-json-api\u002Ftooling","laravel-json-api\u002F5.tooling",[222,226,230],{"title":223,"path":224,"stem":225,"since":118,"experimental":119},"Checking resources","\u002Flaravel-json-api\u002Ftooling\u002Fchecking-resources","laravel-json-api\u002F5.tooling\u002F1.checking-resources",{"title":227,"path":228,"stem":229,"since":118,"experimental":119},"Static analysis","\u002Flaravel-json-api\u002Ftooling\u002Fstatic-analysis","laravel-json-api\u002F5.tooling\u002F2.static-analysis",{"title":231,"path":232,"stem":233,"since":118,"experimental":119},"Deployment","\u002Flaravel-json-api\u002Ftooling\u002Fdeployment","laravel-json-api\u002F5.tooling\u002F3.deployment",{"title":235,"since":118,"experimental":119,"icon":236,"path":237,"stem":238,"children":239,"page":119},"Integrations","i-lucide-plug","\u002Flaravel-json-api\u002Fintegrations","laravel-json-api\u002F6.integrations",[240,244],{"title":241,"path":242,"stem":243,"since":118,"experimental":119},"Laravel's native JSON:API","\u002Flaravel-json-api\u002Fintegrations\u002Fnative-json-api","laravel-json-api\u002F6.integrations\u002F1.native-json-api",{"title":245,"path":246,"stem":247,"since":118,"experimental":119},"OpenAPI","\u002Flaravel-json-api\u002Fintegrations\u002Fopenapi","laravel-json-api\u002F6.integrations\u002F2.openapi",{"title":249,"since":118,"experimental":119,"icon":250,"path":251,"stem":252,"children":253,"page":119},"Reference","i-lucide-library","\u002Flaravel-json-api\u002Freference","laravel-json-api\u002F7.reference",[254,258,262,266,270,274,278],{"title":255,"path":256,"stem":257,"since":118,"experimental":119},"Configuration","\u002Flaravel-json-api\u002Freference\u002Fconfiguration","laravel-json-api\u002F7.reference\u002F1.configuration",{"title":259,"path":260,"stem":261,"since":118,"experimental":119},"Value helpers","\u002Flaravel-json-api\u002Freference\u002Fvalue-helpers","laravel-json-api\u002F7.reference\u002F2.value-helpers",{"title":263,"path":264,"stem":265,"since":118,"experimental":119},"Relation helpers","\u002Flaravel-json-api\u002Freference\u002Frelation-helpers","laravel-json-api\u002F7.reference\u002F3.relation-helpers",{"title":267,"path":268,"stem":269,"since":118,"experimental":119},"PHP attributes","\u002Flaravel-json-api\u002Freference\u002Fphp-attributes","laravel-json-api\u002F7.reference\u002F4.php-attributes",{"title":271,"path":272,"stem":273,"since":118,"experimental":119},"Commands","\u002Flaravel-json-api\u002Freference\u002Fcommands","laravel-json-api\u002F7.reference\u002F5.commands",{"title":275,"path":276,"stem":277,"since":118,"experimental":119},"Diagnostics","\u002Flaravel-json-api\u002Freference\u002Fdiagnostics","laravel-json-api\u002F7.reference\u002F6.diagnostics",{"title":279,"path":280,"stem":281,"since":118,"experimental":119},"Extension points","\u002Flaravel-json-api\u002Freference\u002Fextension-points","laravel-json-api\u002F7.reference\u002F7.extension-points",{"title":283,"path":284,"children":285},"Releases","\u002Flaravel-json-api\u002Freleases",[286,290],{"title":287,"path":288,"stem":289,"since":118,"experimental":119},"Upgrade guide","\u002Flaravel-json-api\u002Fupgrade","laravel-json-api\u002FUPGRADE",{"title":291,"path":292,"stem":293,"since":118,"experimental":119},"Changelog","\u002Flaravel-json-api\u002Fchangelog","laravel-json-api\u002FCHANGELOG",{"id":295,"title":172,"body":296,"description":598,"experimental":119,"extension":599,"links":118,"meta":600,"navigation":476,"path":173,"rawbody":601,"seo":602,"since":118,"stem":174,"__hash__":603},"laravel_json_api\u002Flaravel-json-api\u002F3.requests\u002F1.includes-and-fieldsets.md",{"type":297,"value":298,"toc":592},"minimark",[299,322,327,332,368,372,414,418,424,561,576,580,588],[300,301,302,303,313,314,321],"p",{},"A client asks for related resources with ",[304,305,309],"a",{"href":306,"rel":307},"https:\u002F\u002Fjsonapi.org\u002Fformat\u002F#fetching-includes",[308],"nofollow",[310,311,312],"code",{},"include"," and restricts the\nfields of each type with ",[304,315,318],{"href":316,"rel":317},"https:\u002F\u002Fjsonapi.org\u002Fformat\u002F#fetching-sparse-fieldsets",[308],[310,319,320],{},"fields",". Both are read from the\nquery string only.",[323,324],"http-call",{"method":325,"url":326},"GET","\u002Fposts\u002F10?include=author,comments.author&fields[posts]=title,author&fields[users]=name",[328,329,331],"h2",{"id":330},"includes","Includes",[333,334,335,343,346,356],"ul",{},[336,337,338,339,342],"li",{},"Each path names relationships, dot-separated: ",[310,340,341],{},"comments.author"," includes the comments and their authors.",[336,344,345],{},"The included resources are loaded before rendering, one query per relation and per include level.",[336,347,348,351,352,355],{},[310,349,350],{},"include.max-depth"," bounds the deepest path accepted and rendered (",[310,353,354],{},"null",": no limit).",[336,357,358,359,362,363,367],{},"A relationship included renders its ",[310,360,361],{},"data",", whatever its ",[304,364,366],{"href":365},"\u002Flaravel-json-api\u002Fresources\u002Frelationships#linkage","linkage",".",[328,369,371],{"id":370},"sparse-fieldsets","Sparse fieldsets",[333,373,374,380,394,404],{},[336,375,376,379],{},[310,377,378],{},"fields[type]"," lists the attributes and relationships to render for that type; the others are never computed.",[336,381,382,383,386,387,390,391,393],{},"By default it restricts the relationships too, as the specification says. ",[310,384,385],{},"fields.relationships"," set to ",[310,388,389],{},"keep","\nrenders every relationship whatever ",[310,392,320],{}," (the behaviour of 1.x).",[336,395,396,397,400,401,403],{},"A value with ",[310,398,399],{},"->whenInFields()"," is rendered only when ",[310,402,378],{}," names it explicitly, never by default.",[336,405,406,409,410,367],{},[310,407,408],{},"fields[users]=address.city"," keeps one member of a ",[304,411,413],{"href":412},"\u002Flaravel-json-api\u002Fresources\u002Fattributes#objects","struct",[328,415,417],{"id":416},"reading-them-in-your-code","Reading them in your code",[300,419,420,423],{},[310,421,422],{},"Ark4ne\\JsonApi\\Context\\JsonApiContext"," holds the include tree and the fieldsets of the current request:",[425,426,431],"pre",{"className":427,"code":428,"language":429,"meta":430,"style":430},"language-php shiki shiki-themes material-theme-lighter github-light github-dark","$context = app(JsonApiContext::class);\n\n\u002F\u002F true when the path is included\n$context->include->has('posts.comments');\n\u002F\u002F true when `title` of `post` is rendered\n$context->fields->allows('post', 'title');\n","php","",[310,432,433,471,478,485,517,523],{"__ignoreMap":430},[434,435,438,442,446,450,454,457,461,464,468],"span",{"class":436,"line":437},"line",1,[434,439,441],{"class":440},"sP7_E","$",[434,443,445],{"class":444},"su5hD","context ",[434,447,449],{"class":448},"smGrS","=",[434,451,453],{"class":452},"sGLFI"," app",[434,455,456],{"class":440},"(",[434,458,460],{"class":459},"sZMiF","JsonApiContext",[434,462,463],{"class":448},"::",[434,465,467],{"class":466},"sw1J6","class",[434,469,470],{"class":440},");\n",[434,472,474],{"class":436,"line":473},2,[434,475,477],{"emptyLinePlaceholder":476},true,"\n",[434,479,481],{"class":436,"line":480},3,[434,482,484],{"class":483},"sutJx","\u002F\u002F true when the path is included\n",[434,486,488,490,493,496,498,500,503,505,509,513,515],{"class":436,"line":487},4,[434,489,441],{"class":440},[434,491,492],{"class":444},"context",[434,494,495],{"class":448},"->",[434,497,312],{"class":444},[434,499,495],{"class":448},[434,501,502],{"class":452},"has",[434,504,456],{"class":440},[434,506,508],{"class":507},"sjJ54","'",[434,510,512],{"class":511},"s_sjI","posts.comments",[434,514,508],{"class":507},[434,516,470],{"class":440},[434,518,520],{"class":436,"line":519},5,[434,521,522],{"class":483},"\u002F\u002F true when `title` of `post` is rendered\n",[434,524,526,528,530,532,534,536,539,541,543,546,548,551,554,557,559],{"class":436,"line":525},6,[434,527,441],{"class":440},[434,529,492],{"class":444},[434,531,495],{"class":448},[434,533,320],{"class":444},[434,535,495],{"class":448},[434,537,538],{"class":452},"allows",[434,540,456],{"class":440},[434,542,508],{"class":507},[434,544,545],{"class":511},"post",[434,547,508],{"class":507},[434,549,550],{"class":440},",",[434,552,553],{"class":507}," '",[434,555,556],{"class":511},"title",[434,558,508],{"class":507},[434,560,470],{"class":440},[300,562,563,564,568,569,572,573,367],{},"In a resource, prefer the ",[304,565,567],{"href":566},"\u002Flaravel-json-api\u002Fresources\u002Fconditions#on-the-request","request conditions",":\n",[310,570,571],{},"whenInFields()"," and ",[310,574,575],{},"whenInIncludes()",[328,577,579],{"id":578},"validating-them","Validating them",[300,581,582,583,367],{},"Without validation, an unknown path is ignored. Validate both against the definitions with a\n",[304,584,585],{"href":177},[310,586,587],{},"JsonApiFormRequest",[589,590,591],"style",{},"html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":430,"searchDepth":480,"depth":480,"links":593},[594,595,596,597],{"id":330,"depth":473,"text":331},{"id":370,"depth":473,"text":371},{"id":416,"depth":473,"text":417},{"id":578,"depth":473,"text":579},"How include and fields shape a document, and the settings that bound them.","md",{},"---\ntitle: Includes & sparse fieldsets\ndescription: How include and fields shape a document, and the settings that bound them.\n---\n\nA client asks for related resources with [`include`](https:\u002F\u002Fjsonapi.org\u002Fformat\u002F#fetching-includes) and restricts the\nfields of each type with [`fields`](https:\u002F\u002Fjsonapi.org\u002Fformat\u002F#fetching-sparse-fieldsets). Both are read from the\nquery string only.\n\n::http-call{method=\"GET\" url=\"\u002Fposts\u002F10?include=author,comments.author&fields[posts]=title,author&fields[users]=name\"}\n::\n\n## Includes\n\n- Each path names relationships, dot-separated: `comments.author` includes the comments and their authors.\n- The included resources are loaded before rendering, one query per relation and per include level.\n- `include.max-depth` bounds the deepest path accepted and rendered (`null`: no limit).\n- A relationship included renders its `data`, whatever its [linkage](\u002Flaravel-json-api\u002Fresources\u002Frelationships#linkage).\n\n## Sparse fieldsets\n\n- `fields[type]` lists the attributes and relationships to render for that type; the others are never computed.\n- By default it restricts the relationships too, as the specification says. `fields.relationships` set to `keep`\n  renders every relationship whatever `fields` (the behaviour of 1.x).\n- A value with `->whenInFields()` is rendered only when `fields[type]` names it explicitly, never by default.\n- `fields[users]=address.city` keeps one member of a [struct](\u002Flaravel-json-api\u002Fresources\u002Fattributes#objects).\n\n## Reading them in your code\n\n`Ark4ne\\JsonApi\\Context\\JsonApiContext` holds the include tree and the fieldsets of the current request:\n\n```php\n$context = app(JsonApiContext::class);\n\n\u002F\u002F true when the path is included\n$context->include->has('posts.comments');\n\u002F\u002F true when `title` of `post` is rendered\n$context->fields->allows('post', 'title');\n```\n\nIn a resource, prefer the [request conditions](\u002Flaravel-json-api\u002Fresources\u002Fconditions#on-the-request):\n`whenInFields()` and `whenInIncludes()`.\n\n## Validating them\n\nWithout validation, an unknown path is ignored. Validate both against the definitions with a\n[`JsonApiFormRequest`](\u002Flaravel-json-api\u002Frequests\u002Fvalidation).\n",{"title":172,"description":598},"eWC-3OVbRtzNMPckJWEr9AF25OhtMQLS2GBKzquElJc",[605,607],{"title":162,"path":163,"stem":164,"description":606,"children":-1},"Collections of resources, their document meta, and Laravel's paginators.",{"title":176,"path":177,"stem":178,"description":608,"children":-1},"Validate include and fields against the definitions of your resources.",1795438898770]