[{"data":1,"prerenderedAt":4045},["ShallowReactive",2],{"navigation":3,"\u002Fresources\u002Ffields":307,"\u002Fresources\u002Ffields-surround":4040},{"3.x":4,"2.x":203},[5,32,61,99,121,147,165],{"title":6,"icon":7,"path":8,"stem":9,"children":10,"page":31},"Getting Started","i-heroicons-star","\u002Fgetting-started","1.getting-started",[11,15,19,23,27],{"title":12,"path":13,"stem":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":16,"path":17,"stem":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":20,"path":21,"stem":22},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":24,"path":25,"stem":26},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration",{"title":28,"path":29,"stem":30},"Upgrade guide","\u002Fgetting-started\u002Fupgrade-guide","1.getting-started\u002F5.upgrade-guide",false,{"title":33,"icon":34,"path":35,"stem":36,"children":37,"page":31},"Resources","i-heroicons-document-text","\u002Fresources","2.resources",[38,41,45,49,53,57],{"title":33,"path":39,"stem":40},"\u002Fresources\u002Fresources","2.resources\u002F1.resources",{"title":42,"path":43,"stem":44},"Fields","\u002Fresources\u002Ffields","2.resources\u002F2.fields",{"title":46,"path":47,"stem":48},"Relationships","\u002Fresources\u002Frelations","2.resources\u002F3.relations",{"title":50,"path":51,"stem":52},"Validation","\u002Fresources\u002Fvalidation","2.resources\u002F4.validation",{"title":54,"path":55,"stem":56},"Perimeter","\u002Fresources\u002Fperimeter","2.resources\u002F5.perimeter",{"title":58,"path":59,"stem":60},"Limits","\u002Fresources\u002Flimits","2.resources\u002F6.limits",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":31},"Search","i-heroicons-magnifying-glass","\u002Fsearch","3.search",[67,71,75,79,83,87,91,95],{"title":68,"path":69,"stem":70},"Search overview","\u002Fsearch\u002Foverview","3.search\u002F1.overview",{"title":72,"path":73,"stem":74},"Search filters","\u002Fsearch\u002Ffilters","3.search\u002F2.filters",{"title":76,"path":77,"stem":78},"Sorts and selects","\u002Fsearch\u002Fsorts-and-selects","3.search\u002F3.sorts-and-selects",{"title":80,"path":81,"stem":82},"Includes and aggregates","\u002Fsearch\u002Fincludes-and-aggregates","3.search\u002F4.includes-and-aggregates",{"title":84,"path":85,"stem":86},"Scopes and instructions","\u002Fsearch\u002Fscopes-and-instructions","3.search\u002F5.scopes-and-instructions",{"title":88,"path":89,"stem":90},"Text search","\u002Fsearch\u002Ftext-search","3.search\u002F6.text-search",{"title":92,"path":93,"stem":94},"Search engines","\u002Fsearch\u002Fsearch-engines","3.search\u002F7.search-engines",{"title":96,"path":97,"stem":98},"Searching outside HTTP","\u002Fsearch\u002Foutside-http","3.search\u002F8.outside-http",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":31},"Writing","i-heroicons-pencil-square","\u002Fwriting","4.writing",[105,109,113,117],{"title":106,"path":107,"stem":108},"Mutate","\u002Fwriting\u002Fmutate","4.writing\u002F1.mutate",{"title":110,"path":111,"stem":112},"Writing relations","\u002Fwriting\u002Frelations","4.writing\u002F2.relations",{"title":114,"path":115,"stem":116},"Versioned rows","\u002Fwriting\u002Fversioned-rows","4.writing\u002F3.versioned-rows",{"title":118,"path":119,"stem":120},"Deleting and restoring","\u002Fwriting\u002Fdeleting","4.writing\u002F4.deleting",{"title":122,"icon":123,"path":124,"stem":125,"children":126,"page":31},"Actions and Metrics","i-heroicons-bolt","\u002Factions-and-metrics","5.actions-and-metrics",[127,131,135,139,143],{"title":128,"path":129,"stem":130},"Actions","\u002Factions-and-metrics\u002Factions","5.actions-and-metrics\u002F1.actions",{"title":132,"path":133,"stem":134},"Queued Actions","\u002Factions-and-metrics\u002Fqueued-actions","5.actions-and-metrics\u002F2.queued-actions",{"title":136,"path":137,"stem":138},"Confirmation","\u002Factions-and-metrics\u002Fconfirmation","5.actions-and-metrics\u002F3.confirmation",{"title":140,"path":141,"stem":142},"Metrics","\u002Factions-and-metrics\u002Fmetrics","5.actions-and-metrics\u002F4.metrics",{"title":144,"path":145,"stem":146},"Exports","\u002Factions-and-metrics\u002Fexports","5.actions-and-metrics\u002F5.exports",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":31},"Authorization","i-heroicons-lock-closed","\u002Fauthorization","6.authorization",[153,157,161],{"title":154,"path":155,"stem":156},"Policies","\u002Fauthorization\u002Fpolicies","6.authorization\u002F1.policies",{"title":158,"path":159,"stem":160},"Gates","\u002Fauthorization\u002Fgates","6.authorization\u002F2.gates",{"title":162,"path":163,"stem":164},"Decision Cache","\u002Fauthorization\u002Fdecision-cache","6.authorization\u002F3.decision-cache",{"title":166,"icon":167,"path":168,"stem":169,"children":170,"page":31},"Digging Deeper","i-heroicons-list-bullet","\u002Fdigging-deeper","7.digging-deeper",[171,175,179,183,187,191,195,199],{"title":172,"path":173,"stem":174},"Details","\u002Fdigging-deeper\u002Fdetails","7.digging-deeper\u002F1.details",{"title":176,"path":177,"stem":178},"Events and Hooks","\u002Fdigging-deeper\u002Fevents-and-hooks","7.digging-deeper\u002F2.events-and-hooks",{"title":180,"path":181,"stem":182},"Custom Responses","\u002Fdigging-deeper\u002Fresponses","7.digging-deeper\u002F3.responses",{"title":184,"path":185,"stem":186},"OpenAPI Documentation","\u002Fdigging-deeper\u002Fopenapi","7.digging-deeper\u002F4.openapi",{"title":188,"path":189,"stem":190},"Precognition","\u002Fdigging-deeper\u002Fprecognition","7.digging-deeper\u002F5.precognition",{"title":192,"path":193,"stem":194},"Artisan Commands","\u002Fdigging-deeper\u002Fartisan","7.digging-deeper\u002F6.artisan",{"title":196,"path":197,"stem":198},"Laravel Boost Skill","\u002Fdigging-deeper\u002Fai-skill","7.digging-deeper\u002F7.ai-skill",{"title":200,"path":201,"stem":202},"Translations","\u002Fdigging-deeper\u002Ftranslations","7.digging-deeper\u002F8.translations",[204,215,237,260,297],{"title":6,"icon":7,"path":205,"stem":206,"children":207,"page":31},"\u002F2.x\u002Fgetting-started","2.x\u002F1.getting-started",[208,211],{"title":16,"path":209,"stem":210},"\u002F2.x\u002Fgetting-started\u002Finstallation","2.x\u002F1.getting-started\u002F1.installation",{"title":212,"path":213,"stem":214},"Upgrade Guide","\u002F2.x\u002Fgetting-started\u002Fupgrade-guide","2.x\u002F1.getting-started\u002F2.upgrade-guide",{"title":216,"icon":217,"path":218,"stem":219,"children":220,"page":31},"Endpoints","i-heroicons-arrow-uturn-left","\u002F2.x\u002Fendpoints","2.x\u002F2.endpoints",[221,224,227,230,233],{"title":172,"path":222,"stem":223},"\u002F2.x\u002Fendpoints\u002Fdetails","2.x\u002F2.endpoints\u002F1.details",{"title":62,"path":225,"stem":226},"\u002F2.x\u002Fendpoints\u002Fsearch","2.x\u002F2.endpoints\u002F2.search",{"title":106,"path":228,"stem":229},"\u002F2.x\u002Fendpoints\u002Fmutate","2.x\u002F2.endpoints\u002F3.mutate",{"title":128,"path":231,"stem":232},"\u002F2.x\u002Fendpoints\u002Factions","2.x\u002F2.endpoints\u002F4.actions",{"title":234,"path":235,"stem":236},"Delete","\u002F2.x\u002Fendpoints\u002Fdelete","2.x\u002F2.endpoints\u002F5.delete",{"title":33,"icon":34,"path":238,"stem":239,"children":240,"page":31},"\u002F2.x\u002Fresources","2.x\u002F3.resources",[241,245,249,252,256],{"title":242,"path":243,"stem":244},"Basics","\u002F2.x\u002Fresources\u002Fbasics","2.x\u002F3.resources\u002F1.basics",{"title":246,"path":247,"stem":248},"Exposed Data","\u002F2.x\u002Fresources\u002Fexposed-data","2.x\u002F3.resources\u002F2.exposed-data",{"title":46,"path":250,"stem":251},"\u002F2.x\u002Fresources\u002Frelationships","2.x\u002F3.resources\u002F3.relationships",{"title":253,"path":254,"stem":255},"Validations","\u002F2.x\u002Fresources\u002Fvalidations","2.x\u002F3.resources\u002F4.validations",{"title":257,"path":258,"stem":259},"Interactions","\u002F2.x\u002Fresources\u002Finteractions","2.x\u002F3.resources\u002F5.interactions",{"title":166,"icon":167,"path":261,"stem":262,"children":263,"page":31},"\u002F2.x\u002Fdigging-deeper","2.x\u002F4.digging-deeper",[264,267,271,274,278,282,286,290,294],{"title":128,"path":265,"stem":266},"\u002F2.x\u002Fdigging-deeper\u002Factions","2.x\u002F4.digging-deeper\u002F1.actions",{"title":268,"path":269,"stem":270},"Hooks","\u002F2.x\u002Fdigging-deeper\u002Fhooks","2.x\u002F4.digging-deeper\u002F2.hooks",{"title":158,"path":272,"stem":273},"\u002F2.x\u002Fdigging-deeper\u002Fgates","2.x\u002F4.digging-deeper\u002F3.gates",{"title":275,"path":276,"stem":277},"Authorizations","\u002F2.x\u002Fdigging-deeper\u002Fauthorizations","2.x\u002F4.digging-deeper\u002F4.authorizations",{"title":279,"path":280,"stem":281},"Full Text Search","\u002F2.x\u002Fdigging-deeper\u002Ffull-text-search","2.x\u002F4.digging-deeper\u002F5.full-text-search",{"title":283,"path":284,"stem":285},"Instructions","\u002F2.x\u002Fdigging-deeper\u002Finstructions","2.x\u002F4.digging-deeper\u002F6.instructions",{"title":287,"path":288,"stem":289},"Responses","\u002F2.x\u002Fdigging-deeper\u002Fresponses","2.x\u002F4.digging-deeper\u002F7.responses",{"title":291,"path":292,"stem":293},"Documentation","\u002F2.x\u002Fdigging-deeper\u002Fdocumentation","2.x\u002F4.digging-deeper\u002F8.documentation",{"title":188,"path":295,"stem":296},"\u002F2.x\u002Fdigging-deeper\u002Fprecognition","2.x\u002F4.digging-deeper\u002F9.precognition",{"title":298,"icon":299,"path":300,"stem":301,"children":302,"page":31},"Integrations","i-lucide-puzzle","\u002F2.x\u002Fintegrations","2.x\u002F5.integrations",[303],{"title":304,"path":305,"stem":306},"Flutter","\u002F2.x\u002Fintegrations\u002Fflutter","2.x\u002F5.integrations\u002F1.flutter",{"id":308,"title":42,"body":309,"description":4033,"extension":4034,"links":4035,"meta":4036,"navigation":547,"path":43,"seo":4037,"sitemap":4038,"stem":44,"__hash__":4039},"docs3x\u002F2.resources\u002F2.fields.md",{"type":310,"value":311,"toc":4013},"minimark",[312,317,325,832,1110,1156,1159,1182,1218,1254,1257,1262,1296,1299,1304,1310,1421,1509,1588,1636,1638,1663,1676,1680,1683,1827,1836,1840,1843,1881,2021,2039,2196,2208,2212,2225,2370,2408,2412,2424,2701,2729,2737,2741,2751,2801,2836,2840,2851,3208,3246,3250,3256,3342,3352,3457,3462,3465,3481,3510,3521,3524,3542,3628,3635,3639,3642,3809,3867,3871,3878,3916,3920,3939,4003,4009],[313,314,316],"h2",{"id":315},"declaring-fields","Declaring fields",[318,319,320,324],"p",{},[321,322,323],"code",{},"fields()"," returns typed field objects. Each field names a column of the model and picks the type that matches it:",[326,327,332],"pre",{"className":328,"code":329,"language":330,"meta":331,"style":331},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Lomkit\\Rest\\Fields\\Boolean;\nuse Lomkit\\Rest\\Fields\\Date;\nuse Lomkit\\Rest\\Fields\\DateTime;\nuse Lomkit\\Rest\\Fields\\Enum;\nuse Lomkit\\Rest\\Fields\\ID;\nuse Lomkit\\Rest\\Fields\\Integer;\nuse Lomkit\\Rest\\Fields\\Json;\nuse Lomkit\\Rest\\Fields\\Number;\nuse Lomkit\\Rest\\Fields\\Text;\n\npublic function fields(): array\n{\n    return [\n        ID::make('id'),\n        Text::make('title'),\n        Text::make('summary')->nullable(),\n        Integer::make('views'),\n        Number::make('price'),\n        Boolean::make('featured'),\n        Enum::make('status'),\n        Date::make('published_on')->nullable(),\n        DateTime::make('published_at')->nullable(),\n        Json::make('metadata')->nullable(),\n    ];\n}\n","php","",[321,333,334,366,388,410,432,454,476,498,520,542,549,569,575,585,613,634,661,682,703,724,745,770,795,820,826],{"__ignoreMap":331},[335,336,339,343,347,351,354,356,358,360,363],"span",{"class":337,"line":338},"line",1,[335,340,342],{"class":341},"sbssI","use",[335,344,346],{"class":345},"sTEyZ"," Lomkit",[335,348,350],{"class":349},"sMK4o","\\",[335,352,353],{"class":345},"Rest",[335,355,350],{"class":349},[335,357,42],{"class":345},[335,359,350],{"class":349},[335,361,362],{"class":345},"Boolean",[335,364,365],{"class":349},";\n",[335,367,369,371,373,375,377,379,381,383,386],{"class":337,"line":368},2,[335,370,342],{"class":341},[335,372,346],{"class":345},[335,374,350],{"class":349},[335,376,353],{"class":345},[335,378,350],{"class":349},[335,380,42],{"class":345},[335,382,350],{"class":349},[335,384,385],{"class":345},"Date",[335,387,365],{"class":349},[335,389,391,393,395,397,399,401,403,405,408],{"class":337,"line":390},3,[335,392,342],{"class":341},[335,394,346],{"class":345},[335,396,350],{"class":349},[335,398,353],{"class":345},[335,400,350],{"class":349},[335,402,42],{"class":345},[335,404,350],{"class":349},[335,406,407],{"class":345},"DateTime",[335,409,365],{"class":349},[335,411,413,415,417,419,421,423,425,427,430],{"class":337,"line":412},4,[335,414,342],{"class":341},[335,416,346],{"class":345},[335,418,350],{"class":349},[335,420,353],{"class":345},[335,422,350],{"class":349},[335,424,42],{"class":345},[335,426,350],{"class":349},[335,428,429],{"class":345},"Enum",[335,431,365],{"class":349},[335,433,435,437,439,441,443,445,447,449,452],{"class":337,"line":434},5,[335,436,342],{"class":341},[335,438,346],{"class":345},[335,440,350],{"class":349},[335,442,353],{"class":345},[335,444,350],{"class":349},[335,446,42],{"class":345},[335,448,350],{"class":349},[335,450,451],{"class":345},"ID",[335,453,365],{"class":349},[335,455,457,459,461,463,465,467,469,471,474],{"class":337,"line":456},6,[335,458,342],{"class":341},[335,460,346],{"class":345},[335,462,350],{"class":349},[335,464,353],{"class":345},[335,466,350],{"class":349},[335,468,42],{"class":345},[335,470,350],{"class":349},[335,472,473],{"class":345},"Integer",[335,475,365],{"class":349},[335,477,479,481,483,485,487,489,491,493,496],{"class":337,"line":478},7,[335,480,342],{"class":341},[335,482,346],{"class":345},[335,484,350],{"class":349},[335,486,353],{"class":345},[335,488,350],{"class":349},[335,490,42],{"class":345},[335,492,350],{"class":349},[335,494,495],{"class":345},"Json",[335,497,365],{"class":349},[335,499,501,503,505,507,509,511,513,515,518],{"class":337,"line":500},8,[335,502,342],{"class":341},[335,504,346],{"class":345},[335,506,350],{"class":349},[335,508,353],{"class":345},[335,510,350],{"class":349},[335,512,42],{"class":345},[335,514,350],{"class":349},[335,516,517],{"class":345},"Number",[335,519,365],{"class":349},[335,521,523,525,527,529,531,533,535,537,540],{"class":337,"line":522},9,[335,524,342],{"class":341},[335,526,346],{"class":345},[335,528,350],{"class":349},[335,530,353],{"class":345},[335,532,350],{"class":349},[335,534,42],{"class":345},[335,536,350],{"class":349},[335,538,539],{"class":345},"Text",[335,541,365],{"class":349},[335,543,545],{"class":337,"line":544},10,[335,546,548],{"emptyLinePlaceholder":547},true,"\n",[335,550,552,556,559,563,566],{"class":337,"line":551},11,[335,553,555],{"class":554},"spNyl","public",[335,557,558],{"class":554}," function",[335,560,562],{"class":561},"s2Zo4"," fields",[335,564,565],{"class":349},"():",[335,567,568],{"class":341}," array\n",[335,570,572],{"class":337,"line":571},12,[335,573,574],{"class":349},"{\n",[335,576,578,582],{"class":337,"line":577},13,[335,579,581],{"class":580},"s7zQu","    return",[335,583,584],{"class":349}," [\n",[335,586,588,592,595,598,601,604,608,610],{"class":337,"line":587},14,[335,589,591],{"class":590},"sBMFI","        ID",[335,593,594],{"class":349},"::",[335,596,597],{"class":561},"make",[335,599,600],{"class":349},"(",[335,602,603],{"class":349},"'",[335,605,607],{"class":606},"sfazB","id",[335,609,603],{"class":349},[335,611,612],{"class":349},"),\n",[335,614,616,619,621,623,625,627,630,632],{"class":337,"line":615},15,[335,617,618],{"class":590},"        Text",[335,620,594],{"class":349},[335,622,597],{"class":561},[335,624,600],{"class":349},[335,626,603],{"class":349},[335,628,629],{"class":606},"title",[335,631,603],{"class":349},[335,633,612],{"class":349},[335,635,637,639,641,643,645,647,650,652,655,658],{"class":337,"line":636},16,[335,638,618],{"class":590},[335,640,594],{"class":349},[335,642,597],{"class":561},[335,644,600],{"class":349},[335,646,603],{"class":349},[335,648,649],{"class":606},"summary",[335,651,603],{"class":349},[335,653,654],{"class":349},")->",[335,656,657],{"class":561},"nullable",[335,659,660],{"class":349},"(),\n",[335,662,664,667,669,671,673,675,678,680],{"class":337,"line":663},17,[335,665,666],{"class":590},"        Integer",[335,668,594],{"class":349},[335,670,597],{"class":561},[335,672,600],{"class":349},[335,674,603],{"class":349},[335,676,677],{"class":606},"views",[335,679,603],{"class":349},[335,681,612],{"class":349},[335,683,685,688,690,692,694,696,699,701],{"class":337,"line":684},18,[335,686,687],{"class":590},"        Number",[335,689,594],{"class":349},[335,691,597],{"class":561},[335,693,600],{"class":349},[335,695,603],{"class":349},[335,697,698],{"class":606},"price",[335,700,603],{"class":349},[335,702,612],{"class":349},[335,704,706,709,711,713,715,717,720,722],{"class":337,"line":705},19,[335,707,708],{"class":590},"        Boolean",[335,710,594],{"class":349},[335,712,597],{"class":561},[335,714,600],{"class":349},[335,716,603],{"class":349},[335,718,719],{"class":606},"featured",[335,721,603],{"class":349},[335,723,612],{"class":349},[335,725,727,730,732,734,736,738,741,743],{"class":337,"line":726},20,[335,728,729],{"class":590},"        Enum",[335,731,594],{"class":349},[335,733,597],{"class":561},[335,735,600],{"class":349},[335,737,603],{"class":349},[335,739,740],{"class":606},"status",[335,742,603],{"class":349},[335,744,612],{"class":349},[335,746,748,751,753,755,757,759,762,764,766,768],{"class":337,"line":747},21,[335,749,750],{"class":590},"        Date",[335,752,594],{"class":349},[335,754,597],{"class":561},[335,756,600],{"class":349},[335,758,603],{"class":349},[335,760,761],{"class":606},"published_on",[335,763,603],{"class":349},[335,765,654],{"class":349},[335,767,657],{"class":561},[335,769,660],{"class":349},[335,771,773,776,778,780,782,784,787,789,791,793],{"class":337,"line":772},22,[335,774,775],{"class":590},"        DateTime",[335,777,594],{"class":349},[335,779,597],{"class":561},[335,781,600],{"class":349},[335,783,603],{"class":349},[335,785,786],{"class":606},"published_at",[335,788,603],{"class":349},[335,790,654],{"class":349},[335,792,657],{"class":561},[335,794,660],{"class":349},[335,796,798,801,803,805,807,809,812,814,816,818],{"class":337,"line":797},23,[335,799,800],{"class":590},"        Json",[335,802,594],{"class":349},[335,804,597],{"class":561},[335,806,600],{"class":349},[335,808,603],{"class":349},[335,810,811],{"class":606},"metadata",[335,813,603],{"class":349},[335,815,654],{"class":349},[335,817,657],{"class":561},[335,819,660],{"class":349},[335,821,823],{"class":337,"line":822},24,[335,824,825],{"class":349},"    ];\n",[335,827,829],{"class":337,"line":828},25,[335,830,831],{"class":349},"}\n",[833,834,835,854],"table",{},[836,837,838],"thead",{},[839,840,841,845,848,851],"tr",{},[842,843,844],"th",{},"Column",[842,846,847],{},"Field",[842,849,850],{},"Filter operators",[842,852,853],{},"Base rule",[855,856,857,899,935,976,996,1016,1048,1066,1092],"tbody",{},[839,858,859,863,868,883],{},[860,861,862],"td",{},"primary key",[860,864,865],{},[321,866,867],{},"ID::make('id')",[860,869,870,873,874,873,877,873,880],{},[321,871,872],{},"=",", ",[321,875,876],{},"!=",[321,878,879],{},"in",[321,881,882],{},"not in",[860,884,885,886,873,889,873,892,895,896],{},"the key type: ",[321,887,888],{},"integer",[321,890,891],{},"string",[321,893,894],{},"uuid"," or ",[321,897,898],{},"ulid",[839,900,901,904,909,931],{},[860,902,903],{},"string, text",[860,905,906],{},[321,907,908],{},"Text::make('name')",[860,910,911,873,913,873,915,873,918,873,921,873,924,873,927,873,929],{},[321,912,872],{},[321,914,876],{},[321,916,917],{},"like",[321,919,920],{},"not like",[321,922,923],{},"ilike",[321,925,926],{},"not ilike",[321,928,879],{},[321,930,882],{},[860,932,933],{},[321,934,891],{},[839,936,937,939,944,972],{},[860,938,888],{},[860,940,941],{},[321,942,943],{},"Integer::make('views')",[860,945,946,873,948,873,950,873,953,873,956,873,959,873,962,873,965,873,968,873,970],{},[321,947,872],{},[321,949,876],{},[321,951,952],{},">",[321,954,955],{},">=",[321,957,958],{},"\u003C",[321,960,961],{},"\u003C=",[321,963,964],{},"between",[321,966,967],{},"not between",[321,969,879],{},[321,971,882],{},[860,973,974],{},[321,975,888],{},[839,977,978,981,986,991],{},[860,979,980],{},"decimal, float",[860,982,983],{},[321,984,985],{},"Number::make('price')",[860,987,988,989],{},"same as ",[321,990,473],{},[860,992,993],{},[321,994,995],{},"numeric",[839,997,998,1001,1006,1012],{},[860,999,1000],{},"boolean",[860,1002,1003],{},[321,1004,1005],{},"Boolean::make('featured')",[860,1007,1008,873,1010],{},[321,1009,872],{},[321,1011,876],{},[860,1013,1014],{},[321,1015,1000],{},[839,1017,1018,1021,1026,1044],{},[860,1019,1020],{},"date",[860,1022,1023],{},[321,1024,1025],{},"Date::make('published_on')",[860,1027,1028,873,1030,873,1032,873,1034,873,1036,873,1038,873,1040,873,1042],{},[321,1029,872],{},[321,1031,876],{},[321,1033,952],{},[321,1035,955],{},[321,1037,958],{},[321,1039,961],{},[321,1041,964],{},[321,1043,967],{},[860,1045,1046],{},[321,1047,1020],{},[839,1049,1050,1053,1058,1062],{},[860,1051,1052],{},"datetime, timestamp",[860,1054,1055],{},[321,1056,1057],{},"DateTime::make('published_at')",[860,1059,988,1060],{},[321,1061,385],{},[860,1063,1064],{},[321,1065,1020],{},[839,1067,1068,1071,1076,1086],{},[860,1069,1070],{},"enum cast",[860,1072,1073],{},[321,1074,1075],{},"Enum::make('status')",[860,1077,1078,873,1080,873,1082,873,1084],{},[321,1079,872],{},[321,1081,876],{},[321,1083,879],{},[321,1085,882],{},[860,1087,1088,1091],{},[321,1089,1090],{},"Rule::enum()"," of the cast",[839,1093,1094,1097,1102,1105],{},[860,1095,1096],{},"json, jsonb",[860,1098,1099],{},[321,1100,1101],{},"Json::make('metadata')",[860,1103,1104],{},"none",[860,1106,1107],{},[321,1108,1109],{},"array",[1111,1112,1113,1133,1143,1146],"ul",{},[1114,1115,1116,1117,1120,1121,1124,1125,1128,1129,1132],"li",{},"Add ",[321,1118,1119],{},"->nullable()"," to a nullable column. A nullable field accepts ",[321,1122,1123],{},"null"," in writes, and adds the ",[321,1126,1127],{},"is null"," and ",[321,1130,1131],{},"is not null"," operators.",[1114,1134,1135,1136,1138,1139,1142],{},"A string in ",[321,1137,323],{},", or a name declared twice, throws ",[321,1140,1141],{},"Lomkit\\Rest\\Exceptions\\InvalidFieldException",", which names the resource.",[1114,1144,1145],{},"A name holds no dot.",[1114,1147,1148,1151,1152,1155],{},[321,1149,1150],{},"Lomkit\\Rest\\Fields\\DateTime"," has the same short name as PHP's ",[321,1153,1154],{},"\\DateTime",". In a file that uses both, alias one of them.",[1157,1158,451],"h3",{"id":607},[318,1160,1161,1163,1164,895,1166,1168,1169,895,1172,873,1175,1178,1179,1181],{},[321,1162,451],{}," reads its key type from the model: ",[321,1165,894],{},[321,1167,898],{}," when the model generates the column with ",[321,1170,1171],{},"HasUuids",[321,1173,1174],{},"HasUlids",[321,1176,1177],{},"int"," for an integer key type, ",[321,1180,891],{}," otherwise. Declare it when the model says otherwise:",[326,1183,1185],{"className":328,"code":1184,"language":330,"meta":331,"style":331},"ID::make('code')->keyType('string'),\n",[321,1186,1187],{"__ignoreMap":331},[335,1188,1189,1191,1193,1195,1197,1199,1201,1203,1205,1208,1210,1212,1214,1216],{"class":337,"line":338},[335,1190,451],{"class":590},[335,1192,594],{"class":349},[335,1194,597],{"class":561},[335,1196,600],{"class":349},[335,1198,603],{"class":349},[335,1200,321],{"class":606},[335,1202,603],{"class":349},[335,1204,654],{"class":349},[335,1206,1207],{"class":561},"keyType",[335,1209,600],{"class":349},[335,1211,603],{"class":349},[335,1213,891],{"class":606},[335,1215,603],{"class":349},[335,1217,612],{"class":349},[318,1219,1220,1223,1224,873,1226,873,1228,895,1230,1232,1233,1235,1236,1239,1240,873,1243,1246,1247,1250,1251],{},[321,1221,1222],{},"keyType()"," takes ",[321,1225,1177],{},[321,1227,891],{},[321,1229,894],{},[321,1231,898],{},". The type of the ",[321,1234,451],{}," field types every key that clients send: ",[321,1237,1238],{},"key"," in ",[321,1241,1242],{},"mutate",[321,1244,1245],{},"resources"," on the deletion endpoints and on actions. A key of another type gives a ",[321,1248,1249],{},"422",", such as ",[321,1252,1253],{},"The mutate.0.key field must be an integer.",[1157,1255,429],{"id":1256},"enum",[318,1258,1259,1261],{},[321,1260,429],{}," reads its enum class from the casts of the model. A field that is not bound to a model, such as the input of a scope or an action, names it:",[326,1263,1265],{"className":328,"code":1264,"language":330,"meta":331,"style":331},"Enum::make('status', PostStatus::class),\n",[321,1266,1267],{"__ignoreMap":331},[335,1268,1269,1271,1273,1275,1277,1279,1281,1283,1286,1289,1291,1294],{"class":337,"line":338},[335,1270,429],{"class":590},[335,1272,594],{"class":349},[335,1274,597],{"class":561},[335,1276,600],{"class":349},[335,1278,603],{"class":349},[335,1280,740],{"class":606},[335,1282,603],{"class":349},[335,1284,1285],{"class":349},",",[335,1287,1288],{"class":590}," PostStatus",[335,1290,594],{"class":349},[335,1292,1293],{"class":341},"class",[335,1295,612],{"class":349},[318,1297,1298],{},"The details and the OpenAPI document list the backing values of the enum.",[1300,1301,1303],"h4",{"id":1302},"offered-cases","Offered cases",[318,1305,1306,1309],{},[321,1307,1308],{},"offered()"," withdraws some cases from writes, with a list of cases or a closure. A case left out stays readable, filterable and sortable, so the rows that hold it keep working:",[326,1311,1313],{"className":328,"code":1312,"language":330,"meta":331,"style":331},"Enum::make('status')->offered([ShowStatus::Planned, ShowStatus::OnSale]),\nEnum::make('status')->offered(fn (ShowStatus $status): bool => $status !== ShowStatus::SoldOut),\n",[321,1314,1315,1360],{"__ignoreMap":331},[335,1316,1317,1319,1321,1323,1325,1327,1329,1331,1333,1336,1339,1342,1344,1347,1349,1352,1354,1357],{"class":337,"line":338},[335,1318,429],{"class":590},[335,1320,594],{"class":349},[335,1322,597],{"class":561},[335,1324,600],{"class":349},[335,1326,603],{"class":349},[335,1328,740],{"class":606},[335,1330,603],{"class":349},[335,1332,654],{"class":349},[335,1334,1335],{"class":561},"offered",[335,1337,1338],{"class":349},"([",[335,1340,1341],{"class":590},"ShowStatus",[335,1343,594],{"class":349},[335,1345,1346],{"class":345},"Planned",[335,1348,1285],{"class":349},[335,1350,1351],{"class":590}," ShowStatus",[335,1353,594],{"class":349},[335,1355,1356],{"class":345},"OnSale",[335,1358,1359],{"class":349},"]),\n",[335,1361,1362,1364,1366,1368,1370,1372,1374,1376,1378,1380,1382,1385,1388,1390,1393,1395,1398,1401,1404,1406,1409,1412,1414,1416,1419],{"class":337,"line":368},[335,1363,429],{"class":590},[335,1365,594],{"class":349},[335,1367,597],{"class":561},[335,1369,600],{"class":349},[335,1371,603],{"class":349},[335,1373,740],{"class":606},[335,1375,603],{"class":349},[335,1377,654],{"class":349},[335,1379,1335],{"class":561},[335,1381,600],{"class":349},[335,1383,1384],{"class":554},"fn",[335,1386,1387],{"class":349}," (",[335,1389,1341],{"class":590},[335,1391,1392],{"class":349}," $",[335,1394,740],{"class":345},[335,1396,1397],{"class":349},"):",[335,1399,1400],{"class":341}," bool",[335,1402,1403],{"class":349}," =>",[335,1405,1392],{"class":349},[335,1407,1408],{"class":345},"status ",[335,1410,1411],{"class":349},"!==",[335,1413,1351],{"class":590},[335,1415,594],{"class":349},[335,1417,1418],{"class":345},"SoldOut",[335,1420,612],{"class":349},[326,1422,1427],{"className":1423,"code":1424,"filename":1425,"language":1426,"meta":331,"style":331},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\"mutate\": [{\"operation\": \"update\", \"key\": 2, \"attributes\": {\"status\": \"sold_out\"}}]}\n","POST \u002Fapi\u002Fshows\u002Fmutate","json",[321,1428,1429],{"__ignoreMap":331},[335,1430,1431,1434,1437,1439,1441,1444,1447,1449,1452,1454,1456,1459,1462,1464,1466,1468,1470,1472,1474,1477,1479,1481,1484,1486,1488,1491,1493,1495,1497,1499,1501,1504,1506],{"class":337,"line":338},[335,1432,1433],{"class":349},"{",[335,1435,1436],{"class":349},"\"",[335,1438,1242],{"class":554},[335,1440,1436],{"class":349},[335,1442,1443],{"class":349},":",[335,1445,1446],{"class":349}," [{",[335,1448,1436],{"class":349},[335,1450,1451],{"class":590},"operation",[335,1453,1436],{"class":349},[335,1455,1443],{"class":349},[335,1457,1458],{"class":349}," \"",[335,1460,1461],{"class":606},"update",[335,1463,1436],{"class":349},[335,1465,1285],{"class":349},[335,1467,1458],{"class":349},[335,1469,1238],{"class":590},[335,1471,1436],{"class":349},[335,1473,1443],{"class":349},[335,1475,1476],{"class":341}," 2",[335,1478,1285],{"class":349},[335,1480,1458],{"class":349},[335,1482,1483],{"class":590},"attributes",[335,1485,1436],{"class":349},[335,1487,1443],{"class":349},[335,1489,1490],{"class":349}," {",[335,1492,1436],{"class":349},[335,1494,740],{"class":341},[335,1496,1436],{"class":349},[335,1498,1443],{"class":349},[335,1500,1458],{"class":349},[335,1502,1503],{"class":606},"sold_out",[335,1505,1436],{"class":349},[335,1507,1508],{"class":349},"}}]}\n",[326,1510,1513],{"className":1423,"code":1511,"filename":1512,"language":1426,"meta":331,"style":331},"{\n  \"message\": \"The selected mutate.0.attributes.status is invalid.\",\n  \"errors\": {\n    \"mutate.0.attributes.status\": [\"The selected mutate.0.attributes.status is invalid.\"]\n  }\n}\n","422 Unprocessable Content",[321,1514,1515,1519,1541,1555,1579,1584],{"__ignoreMap":331},[335,1516,1517],{"class":337,"line":338},[335,1518,574],{"class":349},[335,1520,1521,1524,1527,1529,1531,1533,1536,1538],{"class":337,"line":368},[335,1522,1523],{"class":349},"  \"",[335,1525,1526],{"class":554},"message",[335,1528,1436],{"class":349},[335,1530,1443],{"class":349},[335,1532,1458],{"class":349},[335,1534,1535],{"class":606},"The selected mutate.0.attributes.status is invalid.",[335,1537,1436],{"class":349},[335,1539,1540],{"class":349},",\n",[335,1542,1543,1545,1548,1550,1552],{"class":337,"line":390},[335,1544,1523],{"class":349},[335,1546,1547],{"class":554},"errors",[335,1549,1436],{"class":349},[335,1551,1443],{"class":349},[335,1553,1554],{"class":349}," {\n",[335,1556,1557,1560,1563,1565,1567,1570,1572,1574,1576],{"class":337,"line":412},[335,1558,1559],{"class":349},"    \"",[335,1561,1562],{"class":590},"mutate.0.attributes.status",[335,1564,1436],{"class":349},[335,1566,1443],{"class":349},[335,1568,1569],{"class":349}," [",[335,1571,1436],{"class":349},[335,1573,1535],{"class":606},[335,1575,1436],{"class":349},[335,1577,1578],{"class":349},"]\n",[335,1580,1581],{"class":337,"line":434},[335,1582,1583],{"class":349},"  }\n",[335,1585,1586],{"class":337,"line":456},[335,1587,831],{"class":349},[1111,1589,1590,1596,1602,1605,1612,1626],{},[1114,1591,1592,1593,1595],{},"Without ",[321,1594,1308],{},", every case is offered.",[1114,1597,1598,1599,1601],{},"Writes refuse a withdrawn case on its key: the attributes of ",[321,1600,1242],{}," at every level, pivot fields, the fields of actions and instructions, the parameters of scopes, and Precognition requests.",[1114,1603,1604],{},"An update that leaves the field out keeps the stored case, withdrawn or not.",[1114,1606,1607,1608,1611],{},"Filters, sorts and rows keep every case: ",[321,1609,1610],{},"{\"field\": \"status\", \"operator\": \"in\", \"value\": [\"sold_out\"]}"," still finds the sold-out shows.",[1114,1613,1614,1615,1617,1618,1621,1622,1625],{},"The details give ",[321,1616,1335],{}," next to ",[321,1619,1620],{},"values"," when cases are left out: ",[321,1623,1624],{},"\"values\": [\"planned\", \"on_sale\", \"sold_out\"], \"offered\": [\"planned\", \"on_sale\"]",". The OpenAPI document lists the offered cases in the create, update, pivot and input schemas, and every case in the records and the filters.",[1114,1627,1628,1629,1632,1633],{},"A case of another enum, or a list or closure that offers no case, throws ",[321,1630,1631],{},"InvalidFieldException"," when the offered cases are first read: ",[321,1634,1635],{},"The enum field [status] offers no case. Offer at least one case, or declare the field readonly().",[1157,1637,495],{"id":1426},[318,1639,1640,1642,1643,873,1645,895,1648,1651,1652,873,1654,873,1656,895,1659,1662],{},[321,1641,495],{}," works with or without a JSON cast on the model. When the model writes the attribute as it is, with no cast or a ",[321,1644,891],{},[321,1646,1647],{},"encrypted",[321,1649,1650],{},"AsStringable"," cast, and no set mutator, the field encodes the value before Eloquent writes it, and the response returns the decoded value. Any other cast, such as ",[321,1653,1109],{},[321,1655,1426],{},[321,1657,1658],{},"collection",[321,1660,1661],{},"AsArrayObject",", and a set mutator receive the value as sent.",[318,1664,1665,1666,1668,1669,1671,1672,1675],{},"A ",[321,1667,495],{}," value accepts at most 64 levels of nested arrays and objects, the top level included. A ",[321,1670,495],{}," field cannot be filtered, and is sorted only when it declares ",[321,1673,1674],{},"sortable()",".",[313,1677,1679],{"id":1678},"reading-fields","Reading fields",[318,1681,1682],{},"By default, a field is selectable, sortable and filterable with the operators of its type. These methods change what a search can do with it:",[833,1684,1685,1708],{},[836,1686,1687],{},[839,1688,1689,1692,1698,1703],{},[842,1690,1691],{},"Declaration",[842,1693,1694,1697],{},[321,1695,1696],{},"selects"," and rows",[842,1699,1700],{},[321,1701,1702],{},"sorts",[842,1704,1705],{},[321,1706,1707],{},"filters",[855,1709,1710,1727,1747,1767,1787,1800,1813],{},[839,1711,1712,1715,1718,1723],{},[860,1713,1714],{},"default",[860,1716,1717],{},"yes",[860,1719,1720,1721],{},"yes, but not ",[321,1722,495],{},[860,1724,1720,1725],{},[321,1726,495],{},[839,1728,1729,1734,1737,1742],{},[860,1730,1731],{},[321,1732,1733],{},"selectable(false)",[860,1735,1736],{},"no",[860,1738,1739,1740],{},"only with ",[321,1741,1674],{},[860,1743,1739,1744],{},[321,1745,1746],{},"filterable()",[839,1748,1749,1754,1757,1762],{},[860,1750,1751],{},[321,1752,1753],{},"writeOnly()",[860,1755,1756],{},"never returned",[860,1758,1739,1759],{},[321,1760,1761],{},"sortUsing()",[860,1763,1739,1764],{},[321,1765,1766],{},"filterUsing()",[839,1768,1769,1774,1779,1783],{},[860,1770,1771],{},[321,1772,1773],{},"virtual()",[860,1775,1739,1776],{},[321,1777,1778],{},"resolveUsing()",[860,1780,1739,1781],{},[321,1782,1761],{},[860,1784,1739,1785],{},[321,1786,1766],{},[839,1788,1789,1794,1796,1798],{},[860,1790,1791],{},[321,1792,1793],{},"sortable(false)",[860,1795,1717],{},[860,1797,1736],{},[860,1799,1717],{},[839,1801,1802,1807,1809,1811],{},[860,1803,1804],{},[321,1805,1806],{},"filterable(false)",[860,1808,1717],{},[860,1810,1717],{},[860,1812,1736],{},[839,1814,1815,1820,1822,1824],{},[860,1816,1817],{},[321,1818,1819],{},"filterable(['=', 'like'])",[860,1821,1717],{},[860,1823,1717],{},[860,1825,1826],{},"these operators only",[318,1828,1829,1830,1832,1833],{},"A field that a search cannot use gives a ",[321,1831,1249],{},", as an undeclared field does: ",[321,1834,1835],{},"The selected search.filters.0.field is invalid.",[1157,1837,1839],{"id":1838},"value-types-in-rows","Value types in rows",[318,1841,1842],{},"A row returns each value in the type that the OpenAPI document gives its field:",[1111,1844,1845,1863,1872],{},[1114,1846,1847,1128,1849,1851,1852,1855,1856,1859,1860,1675],{},[321,1848,517],{},[321,1850,473],{}," turn a numeric string into a number. A ",[321,1853,1854],{},"decimal:2"," cast reads ",[321,1857,1858],{},"\"25000.50\""," from the database, and the row returns ",[321,1861,1862],{},"25000.5",[1114,1864,1865,1867,1868,1871],{},[321,1866,495],{}," returns an empty array as ",[321,1869,1870],{},"{}",". A list stays a list, and an object an object.",[1114,1873,1874,1875,1877,1878,1880],{},"The other types, ",[321,1876,1123],{},", a string that is not numeric and a list on a ",[321,1879,517],{}," field are returned as they are.",[326,1882,1884],{"className":1423,"code":1883,"language":1426,"meta":331,"style":331},"[\n  {\"id\": 1, \"price\": 25000.5, \"seats\": 300, \"settings\": {\"lights\": \"warm\"}},\n  {\"id\": 2, \"price\": null, \"seats\": 0, \"settings\": {}}\n]\n",[321,1885,1886,1891,1966,2017],{"__ignoreMap":331},[335,1887,1888],{"class":337,"line":338},[335,1889,1890],{"class":349},"[\n",[335,1892,1893,1896,1898,1900,1902,1904,1907,1909,1911,1913,1915,1917,1920,1922,1924,1927,1929,1931,1934,1936,1938,1941,1943,1945,1947,1949,1952,1954,1956,1958,1961,1963],{"class":337,"line":368},[335,1894,1895],{"class":349},"  {",[335,1897,1436],{"class":349},[335,1899,607],{"class":554},[335,1901,1436],{"class":349},[335,1903,1443],{"class":349},[335,1905,1906],{"class":341}," 1",[335,1908,1285],{"class":349},[335,1910,1458],{"class":349},[335,1912,698],{"class":554},[335,1914,1436],{"class":349},[335,1916,1443],{"class":349},[335,1918,1919],{"class":341}," 25000.5",[335,1921,1285],{"class":349},[335,1923,1458],{"class":349},[335,1925,1926],{"class":554},"seats",[335,1928,1436],{"class":349},[335,1930,1443],{"class":349},[335,1932,1933],{"class":341}," 300",[335,1935,1285],{"class":349},[335,1937,1458],{"class":349},[335,1939,1940],{"class":554},"settings",[335,1942,1436],{"class":349},[335,1944,1443],{"class":349},[335,1946,1490],{"class":349},[335,1948,1436],{"class":349},[335,1950,1951],{"class":590},"lights",[335,1953,1436],{"class":349},[335,1955,1443],{"class":349},[335,1957,1458],{"class":349},[335,1959,1960],{"class":606},"warm",[335,1962,1436],{"class":349},[335,1964,1965],{"class":349},"}},\n",[335,1967,1968,1970,1972,1974,1976,1978,1980,1982,1984,1986,1988,1990,1993,1995,1997,1999,2001,2004,2006,2008,2010,2012,2014],{"class":337,"line":390},[335,1969,1895],{"class":349},[335,1971,1436],{"class":349},[335,1973,607],{"class":554},[335,1975,1436],{"class":349},[335,1977,1443],{"class":349},[335,1979,1476],{"class":341},[335,1981,1285],{"class":349},[335,1983,1458],{"class":349},[335,1985,698],{"class":554},[335,1987,1436],{"class":349},[335,1989,1443],{"class":349},[335,1991,1992],{"class":349}," null,",[335,1994,1458],{"class":349},[335,1996,1926],{"class":554},[335,1998,1436],{"class":349},[335,2000,1443],{"class":349},[335,2002,2003],{"class":341}," 0",[335,2005,1285],{"class":349},[335,2007,1458],{"class":349},[335,2009,1940],{"class":554},[335,2011,1436],{"class":349},[335,2013,1443],{"class":349},[335,2015,2016],{"class":349}," {}}\n",[335,2018,2019],{"class":337,"line":412},[335,2020,1578],{"class":349},[318,2022,2023,2024,2027,2028,2030,2031,2034,2035,2038],{},"This covers the rows of a search, their includes and pivots, the records of the ",[321,2025,2026],{},"response"," block of a mutation, the values of ",[321,2029,1778],{}," and the rows of ",[321,2032,2033],{},"Rest::search()",". A custom ",[321,2036,2037],{},"map()"," receives the converted values. Read these values as numbers and objects in your clients.",[326,2040,2042],{"className":328,"code":2041,"language":330,"meta":331,"style":331},"Text::make('api_token')->writeOnly(),                \u002F\u002F written, never returned\nDateTime::make('created_at')->selectable(false),     \u002F\u002F not returned, not sorted, not filtered\nText::make('slug')->filterable(false),               \u002F\u002F refused in filters\nText::make('title')->filterable(['=', 'like']),      \u002F\u002F = and like only\nText::make('summary')->nullable(),                   \u002F\u002F the Text operators, plus is null and is not null\n",[321,2043,2044,2073,2101,2128,2171],{"__ignoreMap":331},[335,2045,2046,2048,2050,2052,2054,2056,2059,2061,2063,2066,2069],{"class":337,"line":338},[335,2047,539],{"class":590},[335,2049,594],{"class":349},[335,2051,597],{"class":561},[335,2053,600],{"class":349},[335,2055,603],{"class":349},[335,2057,2058],{"class":606},"api_token",[335,2060,603],{"class":349},[335,2062,654],{"class":349},[335,2064,2065],{"class":561},"writeOnly",[335,2067,2068],{"class":349},"(),",[335,2070,2072],{"class":2071},"sHwdD","                \u002F\u002F written, never returned\n",[335,2074,2075,2077,2079,2081,2083,2085,2088,2090,2092,2095,2098],{"class":337,"line":368},[335,2076,407],{"class":590},[335,2078,594],{"class":349},[335,2080,597],{"class":561},[335,2082,600],{"class":349},[335,2084,603],{"class":349},[335,2086,2087],{"class":606},"created_at",[335,2089,603],{"class":349},[335,2091,654],{"class":349},[335,2093,2094],{"class":561},"selectable",[335,2096,2097],{"class":349},"(false),",[335,2099,2100],{"class":2071},"     \u002F\u002F not returned, not sorted, not filtered\n",[335,2102,2103,2105,2107,2109,2111,2113,2116,2118,2120,2123,2125],{"class":337,"line":390},[335,2104,539],{"class":590},[335,2106,594],{"class":349},[335,2108,597],{"class":561},[335,2110,600],{"class":349},[335,2112,603],{"class":349},[335,2114,2115],{"class":606},"slug",[335,2117,603],{"class":349},[335,2119,654],{"class":349},[335,2121,2122],{"class":561},"filterable",[335,2124,2097],{"class":349},[335,2126,2127],{"class":2071},"               \u002F\u002F refused in filters\n",[335,2129,2130,2132,2134,2136,2138,2140,2142,2144,2146,2148,2150,2152,2154,2156,2158,2161,2163,2165,2168],{"class":337,"line":412},[335,2131,539],{"class":590},[335,2133,594],{"class":349},[335,2135,597],{"class":561},[335,2137,600],{"class":349},[335,2139,603],{"class":349},[335,2141,629],{"class":606},[335,2143,603],{"class":349},[335,2145,654],{"class":349},[335,2147,2122],{"class":561},[335,2149,1338],{"class":349},[335,2151,603],{"class":349},[335,2153,872],{"class":606},[335,2155,603],{"class":349},[335,2157,1285],{"class":349},[335,2159,2160],{"class":349}," '",[335,2162,917],{"class":606},[335,2164,603],{"class":349},[335,2166,2167],{"class":349},"]),",[335,2169,2170],{"class":2071},"      \u002F\u002F = and like only\n",[335,2172,2173,2175,2177,2179,2181,2183,2185,2187,2189,2191,2193],{"class":337,"line":434},[335,2174,539],{"class":590},[335,2176,594],{"class":349},[335,2178,597],{"class":561},[335,2180,600],{"class":349},[335,2182,603],{"class":349},[335,2184,649],{"class":606},[335,2186,603],{"class":349},[335,2188,654],{"class":349},[335,2190,657],{"class":561},[335,2192,2068],{"class":349},[335,2194,2195],{"class":2071},"                   \u002F\u002F the Text operators, plus is null and is not null\n",[318,2197,2198,2201,2202,2204,2205,1675],{},[321,2199,2200],{},"filterable([...])"," narrows the operators of the field. An operator that its type does not have throws ",[321,2203,1631],{},": ",[321,2206,2207],{},"Boolean::make('featured')->filterable(['>'])",[1157,2209,2211],{"id":2210},"virtual-fields","Virtual fields",[318,2213,2214,2215,2217,2218,2220,2221,2224],{},"A field that is not a column of the table, such as an accessor, is declared ",[321,2216,1773],{},". ",[321,2219,1778],{}," gives its value, and ",[321,2222,2223],{},"requires()"," lists the columns that the callback reads:",[326,2226,2228],{"className":328,"code":2227,"language":330,"meta":331,"style":331},"use Illuminate\\Database\\Eloquent\\Model;\n\nText::make('display_name')\n    ->virtual()\n    ->requires(['first_name', 'last_name'])\n    ->resolveUsing(fn (Model $author): string => $author->first_name.' '.$author->last_name),\n",[321,2229,2230,2254,2258,2278,2289,2317],{"__ignoreMap":331},[335,2231,2232,2234,2237,2239,2242,2244,2247,2249,2252],{"class":337,"line":338},[335,2233,342],{"class":341},[335,2235,2236],{"class":345}," Illuminate",[335,2238,350],{"class":349},[335,2240,2241],{"class":345},"Database",[335,2243,350],{"class":349},[335,2245,2246],{"class":345},"Eloquent",[335,2248,350],{"class":349},[335,2250,2251],{"class":345},"Model",[335,2253,365],{"class":349},[335,2255,2256],{"class":337,"line":368},[335,2257,548],{"emptyLinePlaceholder":547},[335,2259,2260,2262,2264,2266,2268,2270,2273,2275],{"class":337,"line":390},[335,2261,539],{"class":590},[335,2263,594],{"class":349},[335,2265,597],{"class":561},[335,2267,600],{"class":349},[335,2269,603],{"class":349},[335,2271,2272],{"class":606},"display_name",[335,2274,603],{"class":349},[335,2276,2277],{"class":349},")\n",[335,2279,2280,2283,2286],{"class":337,"line":412},[335,2281,2282],{"class":349},"    ->",[335,2284,2285],{"class":561},"virtual",[335,2287,2288],{"class":349},"()\n",[335,2290,2291,2293,2296,2298,2300,2303,2305,2307,2309,2312,2314],{"class":337,"line":434},[335,2292,2282],{"class":349},[335,2294,2295],{"class":561},"requires",[335,2297,1338],{"class":349},[335,2299,603],{"class":349},[335,2301,2302],{"class":606},"first_name",[335,2304,603],{"class":349},[335,2306,1285],{"class":349},[335,2308,2160],{"class":349},[335,2310,2311],{"class":606},"last_name",[335,2313,603],{"class":349},[335,2315,2316],{"class":349},"])\n",[335,2318,2319,2321,2324,2326,2328,2330,2332,2334,2337,2339,2342,2344,2346,2348,2351,2353,2356,2359,2362,2364,2366,2368],{"class":337,"line":456},[335,2320,2282],{"class":349},[335,2322,2323],{"class":561},"resolveUsing",[335,2325,600],{"class":349},[335,2327,1384],{"class":554},[335,2329,1387],{"class":349},[335,2331,2251],{"class":590},[335,2333,1392],{"class":349},[335,2335,2336],{"class":345},"author",[335,2338,1397],{"class":349},[335,2340,2341],{"class":341}," string",[335,2343,1403],{"class":349},[335,2345,1392],{"class":349},[335,2347,2336],{"class":345},[335,2349,2350],{"class":349},"->",[335,2352,2302],{"class":345},[335,2354,2355],{"class":349},".'",[335,2357,2358],{"class":349}," '.",[335,2360,2361],{"class":349},"$",[335,2363,2336],{"class":345},[335,2365,2350],{"class":349},[335,2367,2311],{"class":345},[335,2369,612],{"class":349},[1111,2371,2372,2375,2393,2399],{},[1114,2373,2374],{},"The callback receives the model of each returned row, and runs once per row.",[1114,2376,2377,2378,2380,2381,2383,2384,895,2386,2388,2389,1675],{},"The value is sent as the callback returns it, in the type of the field: a ",[321,2379,495],{}," field does not decode a string, but returns an empty array as ",[321,2382,1870],{},", and a ",[321,2385,517],{},[321,2387,473],{}," field turns a numeric string into a number. See ",[2390,2391,1839],"a",{"href":2392},"#value-types-in-rows",[1114,2394,2395,2396,2398],{},"A field that is not virtual can declare ",[321,2397,1778],{}," too: the callback then replaces the column value.",[1114,2400,2401,2402,2405,2406,1675],{},"The appended attributes of a model (",[321,2403,2404],{},"$appends",") are never returned. Return an appended value through ",[321,2407,1778],{},[1157,2409,2411],{"id":2410},"custom-sorts-and-filters","Custom sorts and filters",[318,2413,2414,1128,2416,2418,2419,1128,2421,2423],{},[321,2415,1761],{},[321,2417,1766],{}," replace the column of a field in ",[321,2420,1702],{},[321,2422,1707],{},". They make a virtual or write-only field sortable or filterable:",[326,2425,2427],{"className":328,"code":2426,"language":330,"meta":331,"style":331},"use Illuminate\\Contracts\\Database\\Eloquent\\Builder;\n\nText::make('full_name')\n    ->virtual()\n    ->sortUsing(fn (Builder $query, string $direction) => $query\n        ->orderBy('last_name', $direction)\n        ->orderBy('first_name', $direction))\n    ->filterable(['=', 'like'])\n    ->filterUsing(fn (Builder $query, string $operator, mixed $value) => $query\n        ->where('first_name', $operator, $value)\n        ->orWhere('last_name', $operator, $value)),\n",[321,2428,2429,2455,2459,2478,2486,2525,2549,2572,2596,2642,2671],{"__ignoreMap":331},[335,2430,2431,2433,2435,2437,2440,2442,2444,2446,2448,2450,2453],{"class":337,"line":338},[335,2432,342],{"class":341},[335,2434,2236],{"class":345},[335,2436,350],{"class":349},[335,2438,2439],{"class":345},"Contracts",[335,2441,350],{"class":349},[335,2443,2241],{"class":345},[335,2445,350],{"class":349},[335,2447,2246],{"class":345},[335,2449,350],{"class":349},[335,2451,2452],{"class":345},"Builder",[335,2454,365],{"class":349},[335,2456,2457],{"class":337,"line":368},[335,2458,548],{"emptyLinePlaceholder":547},[335,2460,2461,2463,2465,2467,2469,2471,2474,2476],{"class":337,"line":390},[335,2462,539],{"class":590},[335,2464,594],{"class":349},[335,2466,597],{"class":561},[335,2468,600],{"class":349},[335,2470,603],{"class":349},[335,2472,2473],{"class":606},"full_name",[335,2475,603],{"class":349},[335,2477,2277],{"class":349},[335,2479,2480,2482,2484],{"class":337,"line":412},[335,2481,2282],{"class":349},[335,2483,2285],{"class":561},[335,2485,2288],{"class":349},[335,2487,2488,2490,2493,2495,2497,2499,2501,2503,2506,2508,2510,2512,2515,2518,2520,2522],{"class":337,"line":434},[335,2489,2282],{"class":349},[335,2491,2492],{"class":561},"sortUsing",[335,2494,600],{"class":349},[335,2496,1384],{"class":554},[335,2498,1387],{"class":349},[335,2500,2452],{"class":590},[335,2502,1392],{"class":349},[335,2504,2505],{"class":345},"query",[335,2507,1285],{"class":349},[335,2509,2341],{"class":341},[335,2511,1392],{"class":349},[335,2513,2514],{"class":345},"direction",[335,2516,2517],{"class":349},")",[335,2519,1403],{"class":349},[335,2521,1392],{"class":349},[335,2523,2524],{"class":345},"query\n",[335,2526,2527,2530,2533,2535,2537,2539,2541,2543,2545,2547],{"class":337,"line":456},[335,2528,2529],{"class":349},"        ->",[335,2531,2532],{"class":561},"orderBy",[335,2534,600],{"class":349},[335,2536,603],{"class":349},[335,2538,2311],{"class":606},[335,2540,603],{"class":349},[335,2542,1285],{"class":349},[335,2544,1392],{"class":349},[335,2546,2514],{"class":345},[335,2548,2277],{"class":349},[335,2550,2551,2553,2555,2557,2559,2561,2563,2565,2567,2569],{"class":337,"line":478},[335,2552,2529],{"class":349},[335,2554,2532],{"class":561},[335,2556,600],{"class":349},[335,2558,603],{"class":349},[335,2560,2302],{"class":606},[335,2562,603],{"class":349},[335,2564,1285],{"class":349},[335,2566,1392],{"class":349},[335,2568,2514],{"class":345},[335,2570,2571],{"class":349},"))\n",[335,2573,2574,2576,2578,2580,2582,2584,2586,2588,2590,2592,2594],{"class":337,"line":500},[335,2575,2282],{"class":349},[335,2577,2122],{"class":561},[335,2579,1338],{"class":349},[335,2581,603],{"class":349},[335,2583,872],{"class":606},[335,2585,603],{"class":349},[335,2587,1285],{"class":349},[335,2589,2160],{"class":349},[335,2591,917],{"class":606},[335,2593,603],{"class":349},[335,2595,2316],{"class":349},[335,2597,2598,2600,2603,2605,2607,2609,2611,2613,2615,2617,2619,2621,2624,2626,2629,2631,2634,2636,2638,2640],{"class":337,"line":522},[335,2599,2282],{"class":349},[335,2601,2602],{"class":561},"filterUsing",[335,2604,600],{"class":349},[335,2606,1384],{"class":554},[335,2608,1387],{"class":349},[335,2610,2452],{"class":590},[335,2612,1392],{"class":349},[335,2614,2505],{"class":345},[335,2616,1285],{"class":349},[335,2618,2341],{"class":341},[335,2620,1392],{"class":349},[335,2622,2623],{"class":345},"operator",[335,2625,1285],{"class":349},[335,2627,2628],{"class":341}," mixed",[335,2630,1392],{"class":349},[335,2632,2633],{"class":345},"value",[335,2635,2517],{"class":349},[335,2637,1403],{"class":349},[335,2639,1392],{"class":349},[335,2641,2524],{"class":345},[335,2643,2644,2646,2649,2651,2653,2655,2657,2659,2661,2663,2665,2667,2669],{"class":337,"line":544},[335,2645,2529],{"class":349},[335,2647,2648],{"class":561},"where",[335,2650,600],{"class":349},[335,2652,603],{"class":349},[335,2654,2302],{"class":606},[335,2656,603],{"class":349},[335,2658,1285],{"class":349},[335,2660,1392],{"class":349},[335,2662,2623],{"class":345},[335,2664,1285],{"class":349},[335,2666,1392],{"class":349},[335,2668,2633],{"class":345},[335,2670,2277],{"class":349},[335,2672,2673,2675,2678,2680,2682,2684,2686,2688,2690,2692,2694,2696,2698],{"class":337,"line":551},[335,2674,2529],{"class":349},[335,2676,2677],{"class":561},"orWhere",[335,2679,600],{"class":349},[335,2681,603],{"class":349},[335,2683,2311],{"class":606},[335,2685,603],{"class":349},[335,2687,1285],{"class":349},[335,2689,1392],{"class":349},[335,2691,2623],{"class":345},[335,2693,1285],{"class":349},[335,2695,1392],{"class":349},[335,2697,2633],{"class":345},[335,2699,2700],{"class":349},")),\n",[1111,2702,2703,2712,2723],{},[1114,2704,2705,2706,895,2709,1675],{},"The sort callback receives the Eloquent query and ",[321,2707,2708],{},"asc",[321,2710,2711],{},"desc",[1114,2713,2714,2715,2718,2719,2722],{},"The filter callback receives the Eloquent query, the operator as a string and the value as sent. It can also be an object that implements ",[321,2716,2717],{},"Lomkit\\Rest\\Contracts\\Filter",". Its conditions stay in their own group, so an ",[321,2720,2721],{},"orWhere()"," does not leave the filter.",[1114,2724,2725,2726,1675],{},"The callbacks also run at the end of a relation path, such as ",[321,2727,2728],{},"author.full_name",[318,2730,2731,2732,1128,2735,1675],{},"See ",[2390,2733,2734],{"href":73},"Filters",[2390,2736,76],{"href":77},[1157,2738,2740],{"id":2739},"columns-a-search-loads","Columns a search loads",[318,2742,2743,2744,2746,2747,2750],{},"A search loads only the columns that its rows need: the returned fields, the model key, the ",[321,2745,2223],{}," of the returned fields, the keys of its includes, and the columns of ",[321,2748,2749],{},"alwaysSelect()",". List there the columns that a policy, an accessor, an observer or a custom response reads without returning them:",[326,2752,2754],{"className":328,"code":2753,"language":330,"meta":331,"style":331},"public function alwaysSelect(): array\n{\n    return ['status', 'team_id'];\n}\n",[321,2755,2756,2769,2773,2797],{"__ignoreMap":331},[335,2757,2758,2760,2762,2765,2767],{"class":337,"line":338},[335,2759,555],{"class":554},[335,2761,558],{"class":554},[335,2763,2764],{"class":561}," alwaysSelect",[335,2766,565],{"class":349},[335,2768,568],{"class":341},[335,2770,2771],{"class":337,"line":368},[335,2772,574],{"class":349},[335,2774,2775,2777,2779,2781,2783,2785,2787,2789,2792,2794],{"class":337,"line":390},[335,2776,581],{"class":580},[335,2778,1569],{"class":349},[335,2780,603],{"class":349},[335,2782,740],{"class":606},[335,2784,603],{"class":349},[335,2786,1285],{"class":349},[335,2788,2160],{"class":349},[335,2790,2791],{"class":606},"team_id",[335,2793,603],{"class":349},[335,2795,2796],{"class":349},"];\n",[335,2798,2799],{"class":337,"line":412},[335,2800,831],{"class":349},[318,2802,2803,2804,2806,2807,2809,2810,2813,2814,2817,2818,2821,2822,2825,2826,1239,2829,2832,2833,1675],{},"A gate policy, a ",[321,2805,1778],{}," callback, a custom ",[321,2808,2037],{},", the ",[321,2811,2812],{},"searched()"," event or ",[321,2815,2816],{},"searchMeta()"," that reads a column that the search did not load throws ",[321,2819,2820],{},"Lomkit\\Rest\\Exceptions\\MissingColumnException",", which names the resource, the column and the model. Set ",[321,2823,2824],{},"search.select_columns"," to ",[321,2827,2828],{},"false",[321,2830,2831],{},"config\u002Frest.php"," to load every column. See ",[2390,2834,24],{"href":2835},"\u002Fgetting-started\u002Fconfiguration#search",[313,2837,2839],{"id":2838},"writing-fields","Writing fields",[318,2841,2842,2843,2845,2846,2848,2849,1443],{},"A field is creatable and updatable by default. ",[321,2844,451],{}," fields are not. These methods change what ",[321,2847,1242],{}," accepts in ",[321,2850,1483],{},[326,2852,2854],{"className":328,"code":2853,"language":330,"meta":331,"style":331},"use Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Str;\n\nID::make('id'),                                    \u002F\u002F refused on create and update\nID::make('uuid')->creatable(),                     \u002F\u002F a key that clients send on create\nDateTime::make('created_at')->readonly(),          \u002F\u002F refused on create and update\nText::make('slug')->updatable(false),              \u002F\u002F written on create only\nText::make('reference')->creatable(false),         \u002F\u002F written on update only\nText::make('api_token')->writeOnly(),              \u002F\u002F written, never returned\nText::make('full_name')\n    ->virtual()\n    ->fillUsing(function (Model $author, mixed $value): void {\n        $author->forceFill([\n            'first_name' => Str::before((string) $value, ' '),\n            'last_name' => Str::after((string) $value, ' '),\n        ]);\n    }),\n",[321,2855,2856,2876,2894,2898,2920,2946,2972,2998,3024,3049,3067,3075,3110,3125,3163,3198,3203],{"__ignoreMap":331},[335,2857,2858,2860,2862,2864,2866,2868,2870,2872,2874],{"class":337,"line":338},[335,2859,342],{"class":341},[335,2861,2236],{"class":345},[335,2863,350],{"class":349},[335,2865,2241],{"class":345},[335,2867,350],{"class":349},[335,2869,2246],{"class":345},[335,2871,350],{"class":349},[335,2873,2251],{"class":345},[335,2875,365],{"class":349},[335,2877,2878,2880,2882,2884,2887,2889,2892],{"class":337,"line":368},[335,2879,342],{"class":341},[335,2881,2236],{"class":345},[335,2883,350],{"class":349},[335,2885,2886],{"class":345},"Support",[335,2888,350],{"class":349},[335,2890,2891],{"class":345},"Str",[335,2893,365],{"class":349},[335,2895,2896],{"class":337,"line":390},[335,2897,548],{"emptyLinePlaceholder":547},[335,2899,2900,2902,2904,2906,2908,2910,2912,2914,2917],{"class":337,"line":412},[335,2901,451],{"class":590},[335,2903,594],{"class":349},[335,2905,597],{"class":561},[335,2907,600],{"class":349},[335,2909,603],{"class":349},[335,2911,607],{"class":606},[335,2913,603],{"class":349},[335,2915,2916],{"class":349},"),",[335,2918,2919],{"class":2071},"                                    \u002F\u002F refused on create and update\n",[335,2921,2922,2924,2926,2928,2930,2932,2934,2936,2938,2941,2943],{"class":337,"line":434},[335,2923,451],{"class":590},[335,2925,594],{"class":349},[335,2927,597],{"class":561},[335,2929,600],{"class":349},[335,2931,603],{"class":349},[335,2933,894],{"class":606},[335,2935,603],{"class":349},[335,2937,654],{"class":349},[335,2939,2940],{"class":561},"creatable",[335,2942,2068],{"class":349},[335,2944,2945],{"class":2071},"                     \u002F\u002F a key that clients send on create\n",[335,2947,2948,2950,2952,2954,2956,2958,2960,2962,2964,2967,2969],{"class":337,"line":456},[335,2949,407],{"class":590},[335,2951,594],{"class":349},[335,2953,597],{"class":561},[335,2955,600],{"class":349},[335,2957,603],{"class":349},[335,2959,2087],{"class":606},[335,2961,603],{"class":349},[335,2963,654],{"class":349},[335,2965,2966],{"class":561},"readonly",[335,2968,2068],{"class":349},[335,2970,2971],{"class":2071},"          \u002F\u002F refused on create and update\n",[335,2973,2974,2976,2978,2980,2982,2984,2986,2988,2990,2993,2995],{"class":337,"line":478},[335,2975,539],{"class":590},[335,2977,594],{"class":349},[335,2979,597],{"class":561},[335,2981,600],{"class":349},[335,2983,603],{"class":349},[335,2985,2115],{"class":606},[335,2987,603],{"class":349},[335,2989,654],{"class":349},[335,2991,2992],{"class":561},"updatable",[335,2994,2097],{"class":349},[335,2996,2997],{"class":2071},"              \u002F\u002F written on create only\n",[335,2999,3000,3002,3004,3006,3008,3010,3013,3015,3017,3019,3021],{"class":337,"line":500},[335,3001,539],{"class":590},[335,3003,594],{"class":349},[335,3005,597],{"class":561},[335,3007,600],{"class":349},[335,3009,603],{"class":349},[335,3011,3012],{"class":606},"reference",[335,3014,603],{"class":349},[335,3016,654],{"class":349},[335,3018,2940],{"class":561},[335,3020,2097],{"class":349},[335,3022,3023],{"class":2071},"         \u002F\u002F written on update only\n",[335,3025,3026,3028,3030,3032,3034,3036,3038,3040,3042,3044,3046],{"class":337,"line":522},[335,3027,539],{"class":590},[335,3029,594],{"class":349},[335,3031,597],{"class":561},[335,3033,600],{"class":349},[335,3035,603],{"class":349},[335,3037,2058],{"class":606},[335,3039,603],{"class":349},[335,3041,654],{"class":349},[335,3043,2065],{"class":561},[335,3045,2068],{"class":349},[335,3047,3048],{"class":2071},"              \u002F\u002F written, never returned\n",[335,3050,3051,3053,3055,3057,3059,3061,3063,3065],{"class":337,"line":544},[335,3052,539],{"class":590},[335,3054,594],{"class":349},[335,3056,597],{"class":561},[335,3058,600],{"class":349},[335,3060,603],{"class":349},[335,3062,2473],{"class":606},[335,3064,603],{"class":349},[335,3066,2277],{"class":349},[335,3068,3069,3071,3073],{"class":337,"line":551},[335,3070,2282],{"class":349},[335,3072,2285],{"class":561},[335,3074,2288],{"class":349},[335,3076,3077,3079,3082,3084,3087,3089,3091,3093,3095,3097,3099,3101,3103,3105,3108],{"class":337,"line":571},[335,3078,2282],{"class":349},[335,3080,3081],{"class":561},"fillUsing",[335,3083,600],{"class":349},[335,3085,3086],{"class":554},"function",[335,3088,1387],{"class":349},[335,3090,2251],{"class":590},[335,3092,1392],{"class":349},[335,3094,2336],{"class":345},[335,3096,1285],{"class":349},[335,3098,2628],{"class":341},[335,3100,1392],{"class":349},[335,3102,2633],{"class":345},[335,3104,1397],{"class":349},[335,3106,3107],{"class":341}," void",[335,3109,1554],{"class":349},[335,3111,3112,3115,3117,3119,3122],{"class":337,"line":577},[335,3113,3114],{"class":349},"        $",[335,3116,2336],{"class":345},[335,3118,2350],{"class":349},[335,3120,3121],{"class":561},"forceFill",[335,3123,3124],{"class":349},"([\n",[335,3126,3127,3130,3132,3134,3136,3139,3141,3144,3147,3149,3151,3153,3155,3157,3159,3161],{"class":337,"line":587},[335,3128,3129],{"class":349},"            '",[335,3131,2302],{"class":606},[335,3133,603],{"class":349},[335,3135,1403],{"class":349},[335,3137,3138],{"class":590}," Str",[335,3140,594],{"class":349},[335,3142,3143],{"class":561},"before",[335,3145,3146],{"class":349},"((",[335,3148,891],{"class":554},[335,3150,2517],{"class":349},[335,3152,1392],{"class":349},[335,3154,2633],{"class":345},[335,3156,1285],{"class":349},[335,3158,2160],{"class":349},[335,3160,2160],{"class":349},[335,3162,612],{"class":349},[335,3164,3165,3167,3169,3171,3173,3175,3177,3180,3182,3184,3186,3188,3190,3192,3194,3196],{"class":337,"line":615},[335,3166,3129],{"class":349},[335,3168,2311],{"class":606},[335,3170,603],{"class":349},[335,3172,1403],{"class":349},[335,3174,3138],{"class":590},[335,3176,594],{"class":349},[335,3178,3179],{"class":561},"after",[335,3181,3146],{"class":349},[335,3183,891],{"class":554},[335,3185,2517],{"class":349},[335,3187,1392],{"class":349},[335,3189,2633],{"class":345},[335,3191,1285],{"class":349},[335,3193,2160],{"class":349},[335,3195,2160],{"class":349},[335,3197,612],{"class":349},[335,3199,3200],{"class":337,"line":636},[335,3201,3202],{"class":349},"        ]);\n",[335,3204,3205],{"class":337,"line":663},[335,3206,3207],{"class":349},"    }),\n",[1111,3209,3210,3225,3234],{},[1114,3211,3212,3215,3216,873,3218,1128,3221,3224],{},[321,3213,3214],{},"create"," accepts the creatable fields, and ",[321,3217,1461],{},[321,3219,3220],{},"sync",[321,3222,3223],{},"toggle"," the updatable fields.",[1114,3226,1665,3227,3229,3230,3233],{},[321,3228,1773],{}," field is refused unless it declares ",[321,3231,3232],{},"fillUsing()",". The callback receives the model and the value, and runs after the other fields of the entry are filled.",[1114,3235,3236,3237,3239,3240,3242,3243],{},"An attribute that the operation cannot write gives a ",[321,3238,1249],{}," under the ",[321,3241,1483],{}," key of the entry: ",[321,3244,3245],{},"The created_at key of the mutate.0.attributes field is not writable on create.",[313,3247,3249],{"id":3248},"validating-fields","Validating fields",[318,3251,3252,3253,3255],{},"Each field validates its value with the base rule of its type, ",[321,3254,657],{},", then its own rules:",[326,3257,3259],{"className":328,"code":3258,"language":330,"meta":331,"style":331},"Text::make('title')\n    ->rules('max:255')                 \u002F\u002F on every write\n    ->creationRules('required')        \u002F\u002F on create\n    ->updateRules('filled'),           \u002F\u002F on update, sync and toggle\n",[321,3260,3261,3279,3300,3321],{"__ignoreMap":331},[335,3262,3263,3265,3267,3269,3271,3273,3275,3277],{"class":337,"line":338},[335,3264,539],{"class":590},[335,3266,594],{"class":349},[335,3268,597],{"class":561},[335,3270,600],{"class":349},[335,3272,603],{"class":349},[335,3274,629],{"class":606},[335,3276,603],{"class":349},[335,3278,2277],{"class":349},[335,3280,3281,3283,3286,3288,3290,3293,3295,3297],{"class":337,"line":368},[335,3282,2282],{"class":349},[335,3284,3285],{"class":561},"rules",[335,3287,600],{"class":349},[335,3289,603],{"class":349},[335,3291,3292],{"class":606},"max:255",[335,3294,603],{"class":349},[335,3296,2517],{"class":349},[335,3298,3299],{"class":2071},"                 \u002F\u002F on every write\n",[335,3301,3302,3304,3307,3309,3311,3314,3316,3318],{"class":337,"line":390},[335,3303,2282],{"class":349},[335,3305,3306],{"class":561},"creationRules",[335,3308,600],{"class":349},[335,3310,603],{"class":349},[335,3312,3313],{"class":606},"required",[335,3315,603],{"class":349},[335,3317,2517],{"class":349},[335,3319,3320],{"class":2071},"        \u002F\u002F on create\n",[335,3322,3323,3325,3328,3330,3332,3335,3337,3339],{"class":337,"line":412},[335,3324,2282],{"class":349},[335,3326,3327],{"class":561},"updateRules",[335,3329,600],{"class":349},[335,3331,603],{"class":349},[335,3333,3334],{"class":606},"filled",[335,3336,603],{"class":349},[335,3338,2916],{"class":349},[335,3340,3341],{"class":2071},"           \u002F\u002F on update, sync and toggle\n",[318,3343,3344,3347,3348,3351],{},[321,3345,3346],{},"label()"," names the field in validation messages, and ",[321,3349,3350],{},"messages()"," replaces Laravel's text for its rules:",[326,3353,3355],{"className":328,"code":3354,"language":330,"meta":331,"style":331},"Text::make('email')\n    ->label(__('email address'))\n    ->creationRules('required', 'unique:users,email')\n    ->messages(['unique' => __('This :attribute is already registered.')]),\n",[321,3356,3357,3376,3399,3424],{"__ignoreMap":331},[335,3358,3359,3361,3363,3365,3367,3369,3372,3374],{"class":337,"line":338},[335,3360,539],{"class":590},[335,3362,594],{"class":349},[335,3364,597],{"class":561},[335,3366,600],{"class":349},[335,3368,603],{"class":349},[335,3370,3371],{"class":606},"email",[335,3373,603],{"class":349},[335,3375,2277],{"class":349},[335,3377,3378,3380,3383,3385,3388,3390,3392,3395,3397],{"class":337,"line":368},[335,3379,2282],{"class":349},[335,3381,3382],{"class":561},"label",[335,3384,600],{"class":349},[335,3386,3387],{"class":561},"__",[335,3389,600],{"class":349},[335,3391,603],{"class":349},[335,3393,3394],{"class":606},"email address",[335,3396,603],{"class":349},[335,3398,2571],{"class":349},[335,3400,3401,3403,3405,3407,3409,3411,3413,3415,3417,3420,3422],{"class":337,"line":390},[335,3402,2282],{"class":349},[335,3404,3306],{"class":561},[335,3406,600],{"class":349},[335,3408,603],{"class":349},[335,3410,3313],{"class":606},[335,3412,603],{"class":349},[335,3414,1285],{"class":349},[335,3416,2160],{"class":349},[335,3418,3419],{"class":606},"unique:users,email",[335,3421,603],{"class":349},[335,3423,2277],{"class":349},[335,3425,3426,3428,3431,3433,3435,3438,3440,3442,3445,3447,3449,3452,3454],{"class":337,"line":412},[335,3427,2282],{"class":349},[335,3429,3430],{"class":561},"messages",[335,3432,1338],{"class":349},[335,3434,603],{"class":349},[335,3436,3437],{"class":606},"unique",[335,3439,603],{"class":349},[335,3441,1403],{"class":349},[335,3443,3444],{"class":561}," __",[335,3446,600],{"class":349},[335,3448,603],{"class":349},[335,3450,3451],{"class":606},"This :attribute is already registered.",[335,3453,603],{"class":349},[335,3455,3456],{"class":349},")]),\n",[318,3458,2731,3459,3461],{},[2390,3460,50],{"href":51}," for the resource rules, the rules that depend on the entry, and the order of the messages.",[313,3463,88],{"id":3464},"text-search",[318,3466,3467,3470,3471,3473,3474,1128,3477,3480],{},[321,3468,3469],{},"searchable()"," marks a ",[321,3472,539],{}," field that the ",[321,3475,3476],{},"Contains",[321,3478,3479],{},"FullText"," text searches read:",[326,3482,3484],{"className":328,"code":3483,"language":330,"meta":331,"style":331},"Text::make('name')->searchable(),\n",[321,3485,3486],{"__ignoreMap":331},[335,3487,3488,3490,3492,3494,3496,3498,3501,3503,3505,3508],{"class":337,"line":338},[335,3489,539],{"class":590},[335,3491,594],{"class":349},[335,3493,597],{"class":561},[335,3495,600],{"class":349},[335,3497,603],{"class":349},[335,3499,3500],{"class":606},"name",[335,3502,603],{"class":349},[335,3504,654],{"class":349},[335,3506,3507],{"class":561},"searchable",[335,3509,660],{"class":349},[318,3511,3512,3513,3515,3516,3518,3519,1675],{},"Only ",[321,3514,539],{}," fields, and field types that extend ",[321,3517,539],{},", can be searchable. A virtual or write-only field cannot. See ",[2390,3520,88],{"href":89},[313,3522,291],{"id":3523},"documentation",[318,3525,3526,3527,3530,3531,3534,3535,3538,3539,1443],{},"Each field gives its OpenAPI type. ",[321,3528,3529],{},"examples()"," lists example values, which the request examples of the document use, and ",[321,3532,3533],{},"meta()"," adds keys that the details return with ",[321,3536,3537],{},"?with=fields.meta"," and the document returns under ",[321,3540,3541],{},"x-lomkit-meta",[326,3543,3545],{"className":328,"code":3544,"language":330,"meta":331,"style":331},"Text::make('priority')\n    ->examples('low', 'normal', 'urgent')\n    ->meta(['placeholder' => 'normal']),\n",[321,3546,3547,3566,3602],{"__ignoreMap":331},[335,3548,3549,3551,3553,3555,3557,3559,3562,3564],{"class":337,"line":338},[335,3550,539],{"class":590},[335,3552,594],{"class":349},[335,3554,597],{"class":561},[335,3556,600],{"class":349},[335,3558,603],{"class":349},[335,3560,3561],{"class":606},"priority",[335,3563,603],{"class":349},[335,3565,2277],{"class":349},[335,3567,3568,3570,3573,3575,3577,3580,3582,3584,3586,3589,3591,3593,3595,3598,3600],{"class":337,"line":368},[335,3569,2282],{"class":349},[335,3571,3572],{"class":561},"examples",[335,3574,600],{"class":349},[335,3576,603],{"class":349},[335,3578,3579],{"class":606},"low",[335,3581,603],{"class":349},[335,3583,1285],{"class":349},[335,3585,2160],{"class":349},[335,3587,3588],{"class":606},"normal",[335,3590,603],{"class":349},[335,3592,1285],{"class":349},[335,3594,2160],{"class":349},[335,3596,3597],{"class":606},"urgent",[335,3599,603],{"class":349},[335,3601,2277],{"class":349},[335,3603,3604,3606,3609,3611,3613,3616,3618,3620,3622,3624,3626],{"class":337,"line":390},[335,3605,2282],{"class":349},[335,3607,3608],{"class":561},"meta",[335,3610,1338],{"class":349},[335,3612,603],{"class":349},[335,3614,3615],{"class":606},"placeholder",[335,3617,603],{"class":349},[335,3619,1403],{"class":349},[335,3621,2160],{"class":349},[335,3623,3588],{"class":606},[335,3625,603],{"class":349},[335,3627,1359],{"class":349},[318,3629,2731,3630,1128,3633,1675],{},[2390,3631,3632],{"href":185},"OpenAPI",[2390,3634,172],{"href":173},[313,3636,3638],{"id":3637},"custom-field-types","Custom field types",[318,3640,3641],{},"A field type of your application extends a field class. Extend the closest type, so that the field keeps its operators, its base rule and its aggregates:",[326,3643,3645],{"className":328,"code":3644,"language":330,"meta":331,"style":331},"use Dedoc\\Scramble\\Support\\Generator\\Types\\NumberType;\nuse Dedoc\\Scramble\\Support\\Generator\\Types\\Type;\nuse Lomkit\\Rest\\Fields\\Number;\n\nclass Money extends Number\n{\n    public function toSchema(): Type\n    {\n        return (new NumberType)->format('decimal');\n    }\n}\n",[321,3646,3647,3680,3709,3729,3733,3746,3750,3765,3770,3800,3805],{"__ignoreMap":331},[335,3648,3649,3651,3654,3656,3659,3661,3663,3665,3668,3670,3673,3675,3678],{"class":337,"line":338},[335,3650,342],{"class":341},[335,3652,3653],{"class":345}," Dedoc",[335,3655,350],{"class":349},[335,3657,3658],{"class":345},"Scramble",[335,3660,350],{"class":349},[335,3662,2886],{"class":345},[335,3664,350],{"class":349},[335,3666,3667],{"class":345},"Generator",[335,3669,350],{"class":349},[335,3671,3672],{"class":345},"Types",[335,3674,350],{"class":349},[335,3676,3677],{"class":345},"NumberType",[335,3679,365],{"class":349},[335,3681,3682,3684,3686,3688,3690,3692,3694,3696,3698,3700,3702,3704,3707],{"class":337,"line":368},[335,3683,342],{"class":341},[335,3685,3653],{"class":345},[335,3687,350],{"class":349},[335,3689,3658],{"class":345},[335,3691,350],{"class":349},[335,3693,2886],{"class":345},[335,3695,350],{"class":349},[335,3697,3667],{"class":345},[335,3699,350],{"class":349},[335,3701,3672],{"class":345},[335,3703,350],{"class":349},[335,3705,3706],{"class":345},"Type",[335,3708,365],{"class":349},[335,3710,3711,3713,3715,3717,3719,3721,3723,3725,3727],{"class":337,"line":390},[335,3712,342],{"class":341},[335,3714,346],{"class":345},[335,3716,350],{"class":349},[335,3718,353],{"class":345},[335,3720,350],{"class":349},[335,3722,42],{"class":345},[335,3724,350],{"class":349},[335,3726,517],{"class":345},[335,3728,365],{"class":349},[335,3730,3731],{"class":337,"line":412},[335,3732,548],{"emptyLinePlaceholder":547},[335,3734,3735,3737,3740,3743],{"class":337,"line":434},[335,3736,1293],{"class":554},[335,3738,3739],{"class":590}," Money",[335,3741,3742],{"class":554}," extends",[335,3744,3745],{"class":590}," Number\n",[335,3747,3748],{"class":337,"line":456},[335,3749,574],{"class":349},[335,3751,3752,3755,3757,3760,3762],{"class":337,"line":478},[335,3753,3754],{"class":554},"    public",[335,3756,558],{"class":554},[335,3758,3759],{"class":561}," toSchema",[335,3761,565],{"class":349},[335,3763,3764],{"class":590}," Type\n",[335,3766,3767],{"class":337,"line":500},[335,3768,3769],{"class":349},"    {\n",[335,3771,3772,3775,3777,3780,3783,3785,3788,3790,3792,3795,3797],{"class":337,"line":522},[335,3773,3774],{"class":580},"        return",[335,3776,1387],{"class":349},[335,3778,3779],{"class":341},"new",[335,3781,3782],{"class":590}," NumberType",[335,3784,654],{"class":349},[335,3786,3787],{"class":561},"format",[335,3789,600],{"class":349},[335,3791,603],{"class":349},[335,3793,3794],{"class":606},"decimal",[335,3796,603],{"class":349},[335,3798,3799],{"class":349},");\n",[335,3801,3802],{"class":337,"line":544},[335,3803,3804],{"class":349},"    }\n",[335,3806,3807],{"class":337,"line":551},[335,3808,831],{"class":349},[1111,3810,3811,3823,3832,3851,3862],{},[1114,3812,3813,3816,3817,3819,3820,3822],{},[321,3814,3815],{},"toSchema()"," returns the Scramble type of the field. A type that extends ",[321,3818,847],{}," directly documents a ",[321,3821,891],{}," until it overrides it.",[1114,3824,3825,3828,3829,3831],{},[321,3826,3827],{},"toWriteSchema()"," returns the type of the values that writes accept. It returns ",[321,3830,3815],{}," unless the type overrides it.",[1114,3833,3834,3837,3838,3840,3841,3843,3844,3847,3848,3850],{},[321,3835,3836],{},"render(mixed $value): mixed"," gives the response form of a value, read from the model or returned by ",[321,3839,1778],{},". A type that documents another type in ",[321,3842,3815],{}," overrides ",[321,3845,3846],{},"render()"," to return that type. A type that already defines a method named ",[321,3849,3846],{}," renames it or gives it this signature.",[1114,3852,3853,1128,3856,3859,3860,1675],{},[321,3854,3855],{},"avg",[321,3857,3858],{},"sum"," aggregates need a field that extends ",[321,3861,517],{},[1114,3863,3864,3865,1675],{},"A search engine declaration refuses the app types that extend a field type. See ",[2390,3866,92],{"href":93},[313,3868,3870],{"id":3869},"reserved-names","Reserved names",[318,3872,3873,3874,3877],{},"A resource cannot declare a field named like a key that the package adds to its rows. The resource throws ",[321,3875,3876],{},"InvalidResourceException"," when its fields are first read:",[1111,3879,3880,3893,3902],{},[1114,3881,3882,3883,3886,3887,1239,3890,3892],{},"the gates key, ",[321,3884,3885],{},"gates"," by default (",[321,3888,3889],{},"gates.key",[321,3891,2831],{},");",[1114,3894,3895,3896,3886,3899,3892],{},"the more key, ",[321,3897,3898],{},"@more",[321,3900,3901],{},"search.more_key",[1114,3903,3904,3905,3886,3908,3911,3912,3915],{},"the morph type key, ",[321,3906,3907],{},"@type",[321,3909,3910],{},"morph.type_key","), on a resource that a ",[321,3913,3914],{},"MorphTo"," relation loads. This one throws when a request resolves the target.",[313,3917,3919],{"id":3918},"input-fields","Input fields",[318,3921,3922,3923,1128,3926,2217,3929,1128,3932,3935,3936,3938],{},"Scopes, instructions and actions declare their inputs with the same field classes. Input fields take ",[321,3924,3925],{},"rules()",[321,3927,3928],{},"default()",[321,3930,3931],{},"creationRules()",[321,3933,3934],{},"updateRules()"," describe writes, and throw ",[321,3937,1631],{}," on an input field:",[326,3940,3942],{"className":328,"code":3941,"language":330,"meta":331,"style":331},"Integer::make('min_views')->default(100),\nBoolean::make('notify')->rules('required'),\n",[321,3943,3944,3972],{"__ignoreMap":331},[335,3945,3946,3948,3950,3952,3954,3956,3959,3961,3963,3965,3967,3970],{"class":337,"line":338},[335,3947,473],{"class":590},[335,3949,594],{"class":349},[335,3951,597],{"class":561},[335,3953,600],{"class":349},[335,3955,603],{"class":349},[335,3957,3958],{"class":606},"min_views",[335,3960,603],{"class":349},[335,3962,654],{"class":349},[335,3964,1714],{"class":561},[335,3966,600],{"class":349},[335,3968,3969],{"class":341},"100",[335,3971,612],{"class":349},[335,3973,3974,3976,3978,3980,3982,3984,3987,3989,3991,3993,3995,3997,3999,4001],{"class":337,"line":368},[335,3975,362],{"class":590},[335,3977,594],{"class":349},[335,3979,597],{"class":561},[335,3981,600],{"class":349},[335,3983,603],{"class":349},[335,3985,3986],{"class":606},"notify",[335,3988,603],{"class":349},[335,3990,654],{"class":349},[335,3992,3285],{"class":561},[335,3994,600],{"class":349},[335,3996,603],{"class":349},[335,3998,3313],{"class":606},[335,4000,603],{"class":349},[335,4002,612],{"class":349},[318,4004,2731,4005,1128,4007,1675],{},[2390,4006,84],{"href":85},[2390,4008,128],{"href":129},[4010,4011,4012],"style",{},"html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":331,"searchDepth":338,"depth":368,"links":4014},[4015,4020,4026,4027,4028,4029,4030,4031,4032],{"id":315,"depth":368,"text":316,"children":4016},[4017,4018,4019],{"id":607,"depth":390,"text":451},{"id":1256,"depth":390,"text":429},{"id":1426,"depth":390,"text":495},{"id":1678,"depth":368,"text":1679,"children":4021},[4022,4023,4024,4025],{"id":1838,"depth":390,"text":1839},{"id":2210,"depth":390,"text":2211},{"id":2410,"depth":390,"text":2411},{"id":2739,"depth":390,"text":2740},{"id":2838,"depth":368,"text":2839},{"id":3248,"depth":368,"text":3249},{"id":3464,"depth":368,"text":88},{"id":3523,"depth":368,"text":291},{"id":3637,"depth":368,"text":3638},{"id":3869,"depth":368,"text":3870},{"id":3918,"depth":368,"text":3919},"Typed fields decide what clients select, sort, filter and write, how each value is validated, and how it is documented.","md",null,{},{"title":42,"description":4033},{"loc":43},"cjhokMU4gTvB7Pp1n5q-xylU86Btj-guJk9AnfcyM2g",[4041,4043],{"title":33,"path":39,"stem":40,"description":4042,"children":-1},"Define a resource for an Eloquent model, bind it to a controller, register its routes and generate it from the table of the model.",{"title":46,"path":47,"stem":48,"description":4044,"children":-1},"Declare the Eloquent relations of a resource, their targets, pivot fields, constraints, link abilities and the operations a mutation accepts on them.",1794181349002]