[{"data":1,"prerenderedAt":641},["ShallowReactive",2],{"libs":3,"navigation-laravel-json-api":115,"\u002Flaravel-json-api\u002Freference\u002Frelation-helpers":294,"\u002Flaravel-json-api\u002Freference\u002Frelation-helpers-surround":636},[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":263,"body":296,"description":629,"experimental":119,"extension":630,"links":118,"meta":631,"navigation":632,"path":264,"rawbody":633,"seo":634,"since":118,"stem":265,"__hash__":635},"laravel_json_api\u002Flaravel-json-api\u002F7.reference\u002F3.relation-helpers.md",{"type":297,"value":298,"toc":622},"minimark",[299,307,312,398,409,413],[300,301,302,303,306],"p",{},"See ",[304,305,154],"a",{"href":155}," for examples.",[308,309,311],"h2",{"id":310},"helpers","Helpers",[313,314,315,328],"table",{},[316,317,318],"thead",{},[319,320,321,325],"tr",{},[322,323,324],"th",{},"Helper",[322,326,327],{},"Relationship",[329,330,331,346,356,370,380],"tbody",{},[319,332,333,340],{},[334,335,336],"td",{},[337,338,339],"code",{},"one(?string $resource = null, string|Closure|null $relation = null)",[334,341,342,343],{},"To-one; reads the relation named like the member, or ",[337,344,345],{},"$relation",[319,347,348,353],{},[334,349,350],{},[337,351,352],{},"many(?string $resource = null, string|Closure|null $relation = null)",[334,354,355],{},"To-many",[319,357,358,363],{},[334,359,360],{},[337,361,362],{},"morph(array $morphs, string|Closure|null $relation = null)",[334,364,365,366,369],{},"Polymorphic to-one: ",[337,367,368],{},"[Post::class => PostResource::class]",", first matching class wins",[319,371,372,377],{},[334,373,374],{},[337,375,376],{},"morphMany(array $morphs, string|Closure|null $relation = null)",[334,378,379],{},"Polymorphic to-many",[319,381,382,387],{},[334,383,384],{},[337,385,386],{},"PostResource::relationship(Closure $value, ?Closure $links = null, ?Closure $meta = null)",[334,388,389,390,393,394,397],{},"Read by a closure (",[337,391,392],{},"->asCollection()"," for a to-many); loads only what ",[337,395,396],{},"->withLoad()"," declares",[300,399,400,401,404,405,408],{},"The resource class may be a ",[337,402,403],{},"JsonApiResource",", a ",[337,406,407],{},"JsonApiCollection",", or a resource of Laravel's native JSON:API\n(rendered as a leaf). Without class, on a resource of an Eloquent model, it is guessed from the relation.",[308,410,412],{"id":411},"modifiers","Modifiers",[313,414,415,425],{},[316,416,417],{},[319,418,419,422],{},[322,420,421],{},"Modifier",[322,423,424],{},"Effect",[329,426,427,448,461,473,486,502,515,525,535,556,569,579,593,606],{},[319,428,429,434],{},[334,430,431],{},[337,432,433],{},"->links(?Closure $links = null, string|Closure|null $self = null, string|Closure|null $related = null)",[334,435,436,439,440,443,444,447],{},[337,437,438],{},"links"," of the relationship object; ",[337,441,442],{},"self:"," and ",[337,445,446],{},"related:"," win",[319,449,450,455],{},[334,451,452],{},[337,453,454],{},"->meta(Closure $meta)",[334,456,457,460],{},[337,458,459],{},"meta"," of the relationship object; receives the related resource or collection",[319,462,463,468],{},[334,464,465],{},[337,466,467],{},"->identifierMeta(Closure $meta)",[334,469,470,472],{},[337,471,459],{}," of each resource identifier; receives each related resource",[319,474,475,480],{},[334,476,477],{},[337,478,479],{},"->pivotMeta(array $attributes, string $accessor = 'pivot')",[334,481,482,483],{},"Identifier meta read from the pivot of a ",[337,484,485],{},"BelongsToMany",[319,487,488,493],{},[334,489,490],{},[337,491,492],{},"->withLoad(bool|string|array $load)",[334,494,495,498,499],{},[337,496,497],{},"false",": never loaded; paths to load, constraints applying to linkage and ",[337,500,501],{},"included",[319,503,504,509],{},[334,505,506],{},[337,507,508],{},"->whenIncluded(?bool $whenIncluded = null)",[334,510,511,514],{},[337,512,513],{},"data"," only when included",[319,516,517,522],{},[334,518,519],{},[337,520,521],{},"->whenLoaded(?string $relation = null)",[334,523,524],{},"Rendered only when the relation is loaded; loaded when included",[319,526,527,532],{},[334,528,529],{},[337,530,531],{},"->whenPivotLoaded(string $table, ?string $accessor = null)",[334,533,534],{},"Rendered only when the pivot is loaded",[319,536,537,542],{},[334,538,539],{},[337,540,541],{},"->linkage(Linkage $linkage)",[334,543,544,547,548,551,552,555],{},[337,545,546],{},"Linkage::Always",", ",[337,549,550],{},"Loaded"," or ",[337,553,554],{},"Included"," for this relationship",[319,557,558,563],{},[334,559,560],{},[337,561,562],{},"->filters(Closure $filters)",[334,564,565,566],{},"Only the related resources passing the rules: ",[337,567,568],{},"fn(Filters $filters) => $filters->can('view')->when(…)",[319,570,571,576],{},[334,572,573],{},[337,574,575],{},"->can(iterable|string $abilities, array $arguments = [], string $gateClass = Gate::class, ?string $guard = null)",[334,577,578],{},"Rendered only when the user has the abilities on the model",[319,580,581,586],{},[334,582,583],{},[337,584,585],{},"->was(Revision $revision, name: …, schema: $this->one(OldResource::class))",[334,587,588,589,592],{},"What the relationship was up to ",[337,590,591],{},"$revision"," included",[319,594,595,603],{},[334,596,597,547,600],{},[337,598,599],{},"->since(Revision $revision)",[337,601,602],{},"->until(Revision $revision)",[334,604,605],{},"As for values",[319,607,608,616],{},[334,609,610,547,613],{},[337,611,612],{},"->when(Closure $condition)",[337,614,615],{},"->unless(Closure $condition)",[334,617,618,619],{},"Left out when the condition fails; receives ",[337,620,621],{},"(null, $model)",{"title":623,"searchDepth":624,"depth":624,"links":625},"",3,[626,628],{"id":310,"depth":627,"text":311},2,{"id":411,"depth":627,"text":412},"Every relationship helper and modifier.","md",{},true,"---\ntitle: Relation helpers\ndescription: Every relationship helper and modifier.\n---\n\nSee [Relationships](\u002Flaravel-json-api\u002Fresources\u002Frelationships) for examples.\n\n## Helpers\n\n| Helper | Relationship |\n| --- | --- |\n| `one(?string $resource = null, string\\|Closure\\|null $relation = null)` | To-one; reads the relation named like the member, or `$relation` |\n| `many(?string $resource = null, string\\|Closure\\|null $relation = null)` | To-many |\n| `morph(array $morphs, string\\|Closure\\|null $relation = null)` | Polymorphic to-one: `[Post::class => PostResource::class]`, first matching class wins |\n| `morphMany(array $morphs, string\\|Closure\\|null $relation = null)` | Polymorphic to-many |\n| `PostResource::relationship(Closure $value, ?Closure $links = null, ?Closure $meta = null)` | Read by a closure (`->asCollection()` for a to-many); loads only what `->withLoad()` declares |\n\nThe resource class may be a `JsonApiResource`, a `JsonApiCollection`, or a resource of Laravel's native JSON:API\n(rendered as a leaf). Without class, on a resource of an Eloquent model, it is guessed from the relation.\n\n## Modifiers\n\n| Modifier | Effect |\n| --- | --- |\n| `->links(?Closure $links = null, string\\|Closure\\|null $self = null, string\\|Closure\\|null $related = null)` | `links` of the relationship object; `self:` and `related:` win |\n| `->meta(Closure $meta)` | `meta` of the relationship object; receives the related resource or collection |\n| `->identifierMeta(Closure $meta)` | `meta` of each resource identifier; receives each related resource |\n| `->pivotMeta(array $attributes, string $accessor = 'pivot')` | Identifier meta read from the pivot of a `BelongsToMany` |\n| `->withLoad(bool\\|string\\|array $load)` | `false`: never loaded; paths to load, constraints applying to linkage and `included` |\n| `->whenIncluded(?bool $whenIncluded = null)` | `data` only when included |\n| `->whenLoaded(?string $relation = null)` | Rendered only when the relation is loaded; loaded when included |\n| `->whenPivotLoaded(string $table, ?string $accessor = null)` | Rendered only when the pivot is loaded |\n| `->linkage(Linkage $linkage)` | `Linkage::Always`, `Loaded` or `Included` for this relationship |\n| `->filters(Closure $filters)` | Only the related resources passing the rules: `fn(Filters $filters) => $filters->can('view')->when(…)` |\n| `->can(iterable\\|string $abilities, array $arguments = [], string $gateClass = Gate::class, ?string $guard = null)` | Rendered only when the user has the abilities on the model |\n| `->was(Revision $revision, name: …, schema: $this->one(OldResource::class))` | What the relationship was up to `$revision` included |\n| `->since(Revision $revision)`, `->until(Revision $revision)` | As for values |\n| `->when(Closure $condition)`, `->unless(Closure $condition)` | Left out when the condition fails; receives `(null, $model)` |\n",{"title":263,"description":629},"jdwE2E51zkMKZREjJvBJqcp9093X6m7l1lSZT8QeWQo",[637,639],{"title":259,"path":260,"stem":261,"description":638,"children":-1},"Every value helper and modifier available in the hooks of a resource.",{"title":267,"path":268,"stem":269,"description":640,"children":-1},"The attributes read on resources and models.",1795438902625]