[{"data":1,"prerenderedAt":2831},["ShallowReactive",2],{"navigation":3,"\u002Fsearch\u002Fscopes-and-instructions":307,"\u002Fsearch\u002Fscopes-and-instructions-surround":2826},{"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":84,"body":309,"description":2819,"extension":2820,"links":2821,"meta":2822,"navigation":385,"path":85,"seo":2823,"sitemap":2824,"stem":86,"__hash__":2825},"docs3x\u002F3.search\u002F5.scopes-and-instructions.md",{"type":310,"value":311,"toc":2807},"minimark",[312,316,321,569,777,898,998,1003,1075,1083,1086,1089,1109,1417,1460,1570,1648,1652,1667,1880,1907,1911,1921,2212,2392,2609,2650,2654,2722,2732,2736,2750,2753,2797,2803],[313,314,315],"p",{},"Scopes and instructions let a client run query logic that the resource declares. A scope calls a local scope of the model with positional parameters. An instruction is a class of its own, with named fields, that changes the query of the search.",[317,318,320],"h2",{"id":319},"scopes","Scopes",[322,323,329],"pre",{"className":324,"code":325,"filename":326,"language":327,"meta":328,"style":328},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Carbon\\CarbonImmutable;\nuse Illuminate\\Database\\Eloquent\\Builder;\n\npublic function scopePublishedSince(Builder $query, CarbonImmutable $since): void\n{\n    $query->where('published_on', '>=', $since);\n}\n\npublic function scopePopular(Builder $query, int $minViews): void\n{\n    $query->where('views', '>=', $minViews);\n}\n","app\u002FModels\u002FPost.php","php","",[330,331,332,355,380,387,430,436,480,486,491,523,528,564],"code",{"__ignoreMap":328},[333,334,337,341,345,349,352],"span",{"class":335,"line":336},"line",1,[333,338,340],{"class":339},"sbssI","use",[333,342,344],{"class":343},"sTEyZ"," Carbon",[333,346,348],{"class":347},"sMK4o","\\",[333,350,351],{"class":343},"CarbonImmutable",[333,353,354],{"class":347},";\n",[333,356,358,360,363,365,368,370,373,375,378],{"class":335,"line":357},2,[333,359,340],{"class":339},[333,361,362],{"class":343}," Illuminate",[333,364,348],{"class":347},[333,366,367],{"class":343},"Database",[333,369,348],{"class":347},[333,371,372],{"class":343},"Eloquent",[333,374,348],{"class":347},[333,376,377],{"class":343},"Builder",[333,379,354],{"class":347},[333,381,383],{"class":335,"line":382},3,[333,384,386],{"emptyLinePlaceholder":385},true,"\n",[333,388,390,394,397,401,404,407,410,413,416,419,421,424,427],{"class":335,"line":389},4,[333,391,393],{"class":392},"spNyl","public",[333,395,396],{"class":392}," function",[333,398,400],{"class":399},"s2Zo4"," scopePublishedSince",[333,402,403],{"class":347},"(",[333,405,377],{"class":406},"sBMFI",[333,408,409],{"class":347}," $",[333,411,412],{"class":343},"query",[333,414,415],{"class":347},",",[333,417,418],{"class":406}," CarbonImmutable",[333,420,409],{"class":347},[333,422,423],{"class":343},"since",[333,425,426],{"class":347},"):",[333,428,429],{"class":339}," void\n",[333,431,433],{"class":335,"line":432},5,[333,434,435],{"class":347},"{\n",[333,437,439,442,444,447,450,452,455,459,461,463,466,469,471,473,475,477],{"class":335,"line":438},6,[333,440,441],{"class":347},"    $",[333,443,412],{"class":343},[333,445,446],{"class":347},"->",[333,448,449],{"class":399},"where",[333,451,403],{"class":347},[333,453,454],{"class":347},"'",[333,456,458],{"class":457},"sfazB","published_on",[333,460,454],{"class":347},[333,462,415],{"class":347},[333,464,465],{"class":347}," '",[333,467,468],{"class":457},">=",[333,470,454],{"class":347},[333,472,415],{"class":347},[333,474,409],{"class":347},[333,476,423],{"class":343},[333,478,479],{"class":347},");\n",[333,481,483],{"class":335,"line":482},7,[333,484,485],{"class":347},"}\n",[333,487,489],{"class":335,"line":488},8,[333,490,386],{"emptyLinePlaceholder":385},[333,492,494,496,498,501,503,505,507,509,511,514,516,519,521],{"class":335,"line":493},9,[333,495,393],{"class":392},[333,497,396],{"class":392},[333,499,500],{"class":399}," scopePopular",[333,502,403],{"class":347},[333,504,377],{"class":406},[333,506,409],{"class":347},[333,508,412],{"class":343},[333,510,415],{"class":347},[333,512,513],{"class":339}," int",[333,515,409],{"class":347},[333,517,518],{"class":343},"minViews",[333,520,426],{"class":347},[333,522,429],{"class":339},[333,524,526],{"class":335,"line":525},10,[333,527,435],{"class":347},[333,529,531,533,535,537,539,541,543,546,548,550,552,554,556,558,560,562],{"class":335,"line":530},11,[333,532,441],{"class":347},[333,534,412],{"class":343},[333,536,446],{"class":347},[333,538,449],{"class":399},[333,540,403],{"class":347},[333,542,454],{"class":347},[333,544,545],{"class":457},"views",[333,547,454],{"class":347},[333,549,415],{"class":347},[333,551,465],{"class":347},[333,553,468],{"class":457},[333,555,454],{"class":347},[333,557,415],{"class":347},[333,559,409],{"class":347},[333,561,518],{"class":343},[333,563,479],{"class":347},[333,565,567],{"class":335,"line":566},12,[333,568,485],{"class":347},[322,570,573],{"className":324,"code":571,"filename":572,"language":327,"meta":328,"style":328},"use Lomkit\\Rest\\Fields\\Date;\nuse Lomkit\\Rest\\Fields\\Integer;\nuse Lomkit\\Rest\\Scopes\\Scope;\n\npublic function scopes(): array\n{\n    return [\n        Scope::make('publishedSince')->fields([Date::make('since')]),\n        Scope::make('popular')->fields([Integer::make('min_views')->default(100)]),\n    ];\n}\n","app\u002FRest\u002FResources\u002FPostResource.php",[330,574,575,598,619,640,644,659,663,672,718,768,773],{"__ignoreMap":328},[333,576,577,579,582,584,587,589,591,593,596],{"class":335,"line":336},[333,578,340],{"class":339},[333,580,581],{"class":343}," Lomkit",[333,583,348],{"class":347},[333,585,586],{"class":343},"Rest",[333,588,348],{"class":347},[333,590,42],{"class":343},[333,592,348],{"class":347},[333,594,595],{"class":343},"Date",[333,597,354],{"class":347},[333,599,600,602,604,606,608,610,612,614,617],{"class":335,"line":357},[333,601,340],{"class":339},[333,603,581],{"class":343},[333,605,348],{"class":347},[333,607,586],{"class":343},[333,609,348],{"class":347},[333,611,42],{"class":343},[333,613,348],{"class":347},[333,615,616],{"class":343},"Integer",[333,618,354],{"class":347},[333,620,621,623,625,627,629,631,633,635,638],{"class":335,"line":382},[333,622,340],{"class":339},[333,624,581],{"class":343},[333,626,348],{"class":347},[333,628,586],{"class":343},[333,630,348],{"class":347},[333,632,320],{"class":343},[333,634,348],{"class":347},[333,636,637],{"class":343},"Scope",[333,639,354],{"class":347},[333,641,642],{"class":335,"line":389},[333,643,386],{"emptyLinePlaceholder":385},[333,645,646,648,650,653,656],{"class":335,"line":432},[333,647,393],{"class":392},[333,649,396],{"class":392},[333,651,652],{"class":399}," scopes",[333,654,655],{"class":347},"():",[333,657,658],{"class":339}," array\n",[333,660,661],{"class":335,"line":438},[333,662,435],{"class":347},[333,664,665,669],{"class":335,"line":482},[333,666,668],{"class":667},"s7zQu","    return",[333,670,671],{"class":347}," [\n",[333,673,674,677,680,683,685,687,690,692,695,698,701,703,705,707,709,711,713,715],{"class":335,"line":488},[333,675,676],{"class":406},"        Scope",[333,678,679],{"class":347},"::",[333,681,682],{"class":399},"make",[333,684,403],{"class":347},[333,686,454],{"class":347},[333,688,689],{"class":457},"publishedSince",[333,691,454],{"class":347},[333,693,694],{"class":347},")->",[333,696,697],{"class":399},"fields",[333,699,700],{"class":347},"([",[333,702,595],{"class":406},[333,704,679],{"class":347},[333,706,682],{"class":399},[333,708,403],{"class":347},[333,710,454],{"class":347},[333,712,423],{"class":457},[333,714,454],{"class":347},[333,716,717],{"class":347},")]),\n",[333,719,720,722,724,726,728,730,733,735,737,739,741,743,745,747,749,751,754,756,758,761,763,766],{"class":335,"line":493},[333,721,676],{"class":406},[333,723,679],{"class":347},[333,725,682],{"class":399},[333,727,403],{"class":347},[333,729,454],{"class":347},[333,731,732],{"class":457},"popular",[333,734,454],{"class":347},[333,736,694],{"class":347},[333,738,697],{"class":399},[333,740,700],{"class":347},[333,742,616],{"class":406},[333,744,679],{"class":347},[333,746,682],{"class":399},[333,748,403],{"class":347},[333,750,454],{"class":347},[333,752,753],{"class":457},"min_views",[333,755,454],{"class":347},[333,757,694],{"class":347},[333,759,760],{"class":399},"default",[333,762,403],{"class":347},[333,764,765],{"class":339},"100",[333,767,717],{"class":347},[333,769,770],{"class":335,"line":525},[333,771,772],{"class":347},"    ];\n",[333,774,775],{"class":335,"line":530},[333,776,485],{"class":347},[322,778,783],{"className":779,"code":780,"filename":781,"language":782,"meta":328,"style":328},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"search\": {\n    \"scopes\": [\n      {\"name\": \"publishedSince\", \"parameters\": [\"2026-01-01\"]},\n      {\"name\": \"popular\"}\n    ]\n  }\n}\n","POST \u002Fapi\u002Fposts\u002Fsearch","json",[330,784,785,789,806,819,864,884,889,894],{"__ignoreMap":328},[333,786,787],{"class":335,"line":336},[333,788,435],{"class":347},[333,790,791,794,797,800,803],{"class":335,"line":357},[333,792,793],{"class":347},"  \"",[333,795,796],{"class":392},"search",[333,798,799],{"class":347},"\"",[333,801,802],{"class":347},":",[333,804,805],{"class":347}," {\n",[333,807,808,811,813,815,817],{"class":335,"line":382},[333,809,810],{"class":347},"    \"",[333,812,319],{"class":406},[333,814,799],{"class":347},[333,816,802],{"class":347},[333,818,671],{"class":347},[333,820,821,824,826,829,831,833,836,838,840,842,844,847,849,851,854,856,859,861],{"class":335,"line":389},[333,822,823],{"class":347},"      {",[333,825,799],{"class":347},[333,827,828],{"class":339},"name",[333,830,799],{"class":347},[333,832,802],{"class":347},[333,834,835],{"class":347}," \"",[333,837,689],{"class":457},[333,839,799],{"class":347},[333,841,415],{"class":347},[333,843,835],{"class":347},[333,845,846],{"class":339},"parameters",[333,848,799],{"class":347},[333,850,802],{"class":347},[333,852,853],{"class":347}," [",[333,855,799],{"class":347},[333,857,858],{"class":457},"2026-01-01",[333,860,799],{"class":347},[333,862,863],{"class":347},"]},\n",[333,865,866,868,870,872,874,876,878,880,882],{"class":335,"line":432},[333,867,823],{"class":347},[333,869,799],{"class":347},[333,871,828],{"class":339},[333,873,799],{"class":347},[333,875,802],{"class":347},[333,877,835],{"class":347},[333,879,732],{"class":457},[333,881,799],{"class":347},[333,883,485],{"class":347},[333,885,886],{"class":335,"line":438},[333,887,888],{"class":347},"    ]\n",[333,890,891],{"class":335,"line":482},[333,892,893],{"class":347},"  }\n",[333,895,896],{"class":335,"line":488},[333,897,485],{"class":347},[899,900,901,923,929,951,960,967,978,984],"ul",{},[902,903,904,907,908,910,911,914,915,918,919,922],"li",{},[330,905,906],{},"scopes()"," returns ",[330,909,637],{}," objects. Each one names a local scope of the model: a ",[330,912,913],{},"scopeX()"," method or a method with the ",[330,916,917],{},"#[Scope]"," attribute. Builder methods and macros, such as ",[330,920,921],{},"withTrashed",", cannot be called as scopes.",[902,924,925,928],{},[330,926,927],{},"fields()"," declares the parameters, in the order of the arguments of the scope method.",[902,930,931,933,934,937,938,940,941,943,944,946,947,950],{},[330,932,846],{}," is a positional list: each value binds to the field at the same position, is validated by the rules of that field, cast to its type and filled from its ",[330,935,936],{},"default()",". A ",[330,939,595],{}," reaches the scope as a ",[330,942,351],{}," at the start of the day, an ",[330,945,616],{}," as an ",[330,948,949],{},"int",".",[902,952,953,954,956,957,950],{},"A position is required unless its field declares ",[330,955,936],{},". A nullable field accepts an explicit ",[330,958,959],{},"null",[902,961,962,963,966],{},"A rule that names another field of the same scope, such as ",[330,964,965],{},"gte:min",", compares with the parameter at that field's position.",[902,968,969,970,973,974,977],{},"Each scope applies in its own group, joined to the rest of the search with ",[330,971,972],{},"and",": an ",[330,975,976],{},"orWhere()"," in the scope does not widen the perimeter or the other filters.",[902,979,980,981,983],{},"Includes take ",[330,982,319],{}," too, with the scopes of the related resource.",[902,985,986,989,990,994,995,950],{},[330,987,988],{},"meta([...])"," on a scope adds keys to its entry in the ",[991,992,993],"a",{"href":173},"details",", returned when the request asks for ",[330,996,997],{},"with=scopes.meta",[999,1000,1002],"h3",{"id":1001},"scope-errors","Scope errors",[1004,1005,1006,1019],"table",{},[1007,1008,1009],"thead",{},[1010,1011,1012,1016],"tr",{},[1013,1014,1015],"th",{},"Message",[1013,1017,1018],{},"Cause",[1020,1021,1022,1033,1045,1055,1065],"tbody",{},[1010,1023,1024,1030],{},[1025,1026,1027],"td",{},[330,1028,1029],{},"The selected search.scopes.0.name is invalid.",[1025,1031,1032],{},"A scope that the resource does not declare",[1010,1034,1035,1040],{},[1025,1036,1037],{},[330,1038,1039],{},"The search.scopes.0.parameters.0 field is required.",[1025,1041,1042,1043],{},"A missing position without ",[330,1044,936],{},[1010,1046,1047,1052],{},[1025,1048,1049],{},[330,1050,1051],{},"The search.scopes.0.parameters.0 field must be a valid date.",[1025,1053,1054],{},"A value that the field type refuses",[1010,1056,1057,1062],{},[1025,1058,1059],{},[330,1060,1061],{},"The search.scopes.0.parameters field must not have more than 1 items.",[1025,1063,1064],{},"More parameters than the scope declares",[1010,1066,1067,1072],{},[1025,1068,1069],{},[330,1070,1071],{},"The search.scopes.0.parameters field must be a list.",[1025,1073,1074],{},"Named parameters instead of a list",[313,1076,1077,1078,1080,1081,950],{},"Next to a text search on a search engine, ",[330,1079,319],{}," gives a 422, see ",[991,1082,92],{"href":93},[317,1084,283],{"id":1085},"instructions",[313,1087,1088],{},"Generate an instruction:",[322,1090,1094],{"className":1091,"code":1092,"language":1093,"meta":328,"style":328},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","php artisan rest:instruction PriceRange\n","bash",[330,1095,1096],{"__ignoreMap":328},[333,1097,1098,1100,1103,1106],{"class":335,"line":336},[333,1099,327],{"class":406},[333,1101,1102],{"class":457}," artisan",[333,1104,1105],{"class":457}," rest:instruction",[333,1107,1108],{"class":457}," PriceRange\n",[322,1110,1113],{"className":324,"code":1111,"filename":1112,"language":327,"meta":328,"style":328},"use Illuminate\\Database\\Eloquent\\Builder;\nuse Lomkit\\Rest\\Fields\\Integer;\nuse Lomkit\\Rest\\Instructions\\Instruction;\nuse Lomkit\\Rest\\Instructions\\InstructionFields;\n\nclass PriceRange extends Instruction\n{\n    public function fields(): array\n    {\n        return [\n            Integer::make('min')->default(0),\n            Integer::make('max')->rules('required'),\n        ];\n    }\n\n    public function handle(InstructionFields $fields, Builder $query): void\n    {\n        $query->whereBetween('price', [$fields->min, $fields->max]);\n    }\n}\n","app\u002FRest\u002FInstructions\u002FPriceRange.php",[330,1114,1115,1135,1155,1176,1197,1201,1215,1219,1233,1238,1245,1275,1308,1314,1320,1325,1356,1361,1407,1412],{"__ignoreMap":328},[333,1116,1117,1119,1121,1123,1125,1127,1129,1131,1133],{"class":335,"line":336},[333,1118,340],{"class":339},[333,1120,362],{"class":343},[333,1122,348],{"class":347},[333,1124,367],{"class":343},[333,1126,348],{"class":347},[333,1128,372],{"class":343},[333,1130,348],{"class":347},[333,1132,377],{"class":343},[333,1134,354],{"class":347},[333,1136,1137,1139,1141,1143,1145,1147,1149,1151,1153],{"class":335,"line":357},[333,1138,340],{"class":339},[333,1140,581],{"class":343},[333,1142,348],{"class":347},[333,1144,586],{"class":343},[333,1146,348],{"class":347},[333,1148,42],{"class":343},[333,1150,348],{"class":347},[333,1152,616],{"class":343},[333,1154,354],{"class":347},[333,1156,1157,1159,1161,1163,1165,1167,1169,1171,1174],{"class":335,"line":382},[333,1158,340],{"class":339},[333,1160,581],{"class":343},[333,1162,348],{"class":347},[333,1164,586],{"class":343},[333,1166,348],{"class":347},[333,1168,283],{"class":343},[333,1170,348],{"class":347},[333,1172,1173],{"class":343},"Instruction",[333,1175,354],{"class":347},[333,1177,1178,1180,1182,1184,1186,1188,1190,1192,1195],{"class":335,"line":389},[333,1179,340],{"class":339},[333,1181,581],{"class":343},[333,1183,348],{"class":347},[333,1185,586],{"class":343},[333,1187,348],{"class":347},[333,1189,283],{"class":343},[333,1191,348],{"class":347},[333,1193,1194],{"class":343},"InstructionFields",[333,1196,354],{"class":347},[333,1198,1199],{"class":335,"line":432},[333,1200,386],{"emptyLinePlaceholder":385},[333,1202,1203,1206,1209,1212],{"class":335,"line":438},[333,1204,1205],{"class":392},"class",[333,1207,1208],{"class":406}," PriceRange",[333,1210,1211],{"class":392}," extends",[333,1213,1214],{"class":406}," Instruction\n",[333,1216,1217],{"class":335,"line":482},[333,1218,435],{"class":347},[333,1220,1221,1224,1226,1229,1231],{"class":335,"line":488},[333,1222,1223],{"class":392},"    public",[333,1225,396],{"class":392},[333,1227,1228],{"class":399}," fields",[333,1230,655],{"class":347},[333,1232,658],{"class":339},[333,1234,1235],{"class":335,"line":493},[333,1236,1237],{"class":347},"    {\n",[333,1239,1240,1243],{"class":335,"line":525},[333,1241,1242],{"class":667},"        return",[333,1244,671],{"class":347},[333,1246,1247,1250,1252,1254,1256,1258,1261,1263,1265,1267,1269,1272],{"class":335,"line":530},[333,1248,1249],{"class":406},"            Integer",[333,1251,679],{"class":347},[333,1253,682],{"class":399},[333,1255,403],{"class":347},[333,1257,454],{"class":347},[333,1259,1260],{"class":457},"min",[333,1262,454],{"class":347},[333,1264,694],{"class":347},[333,1266,760],{"class":399},[333,1268,403],{"class":347},[333,1270,1271],{"class":339},"0",[333,1273,1274],{"class":347},"),\n",[333,1276,1277,1279,1281,1283,1285,1287,1290,1292,1294,1297,1299,1301,1304,1306],{"class":335,"line":566},[333,1278,1249],{"class":406},[333,1280,679],{"class":347},[333,1282,682],{"class":399},[333,1284,403],{"class":347},[333,1286,454],{"class":347},[333,1288,1289],{"class":457},"max",[333,1291,454],{"class":347},[333,1293,694],{"class":347},[333,1295,1296],{"class":399},"rules",[333,1298,403],{"class":347},[333,1300,454],{"class":347},[333,1302,1303],{"class":457},"required",[333,1305,454],{"class":347},[333,1307,1274],{"class":347},[333,1309,1311],{"class":335,"line":1310},13,[333,1312,1313],{"class":347},"        ];\n",[333,1315,1317],{"class":335,"line":1316},14,[333,1318,1319],{"class":347},"    }\n",[333,1321,1323],{"class":335,"line":1322},15,[333,1324,386],{"emptyLinePlaceholder":385},[333,1326,1328,1330,1332,1335,1337,1339,1341,1343,1345,1348,1350,1352,1354],{"class":335,"line":1327},16,[333,1329,1223],{"class":392},[333,1331,396],{"class":392},[333,1333,1334],{"class":399}," handle",[333,1336,403],{"class":347},[333,1338,1194],{"class":406},[333,1340,409],{"class":347},[333,1342,697],{"class":343},[333,1344,415],{"class":347},[333,1346,1347],{"class":406}," Builder",[333,1349,409],{"class":347},[333,1351,412],{"class":343},[333,1353,426],{"class":347},[333,1355,429],{"class":339},[333,1357,1359],{"class":335,"line":1358},17,[333,1360,1237],{"class":347},[333,1362,1364,1367,1369,1371,1374,1376,1378,1381,1383,1385,1388,1390,1392,1394,1396,1398,1400,1402,1404],{"class":335,"line":1363},18,[333,1365,1366],{"class":347},"        $",[333,1368,412],{"class":343},[333,1370,446],{"class":347},[333,1372,1373],{"class":399},"whereBetween",[333,1375,403],{"class":347},[333,1377,454],{"class":347},[333,1379,1380],{"class":457},"price",[333,1382,454],{"class":347},[333,1384,415],{"class":347},[333,1386,1387],{"class":347}," [$",[333,1389,697],{"class":343},[333,1391,446],{"class":347},[333,1393,1260],{"class":343},[333,1395,415],{"class":347},[333,1397,409],{"class":347},[333,1399,697],{"class":343},[333,1401,446],{"class":347},[333,1403,1289],{"class":343},[333,1405,1406],{"class":347},"]);\n",[333,1408,1410],{"class":335,"line":1409},19,[333,1411,1319],{"class":347},[333,1413,1415],{"class":335,"line":1414},20,[333,1416,485],{"class":347},[322,1418,1421],{"className":324,"code":1419,"filename":1420,"language":327,"meta":328,"style":328},"public function instructions(): array\n{\n    return [PriceRange::make()];\n}\n","app\u002FRest\u002FResources\u002FProductResource.php",[330,1422,1423,1436,1440,1456],{"__ignoreMap":328},[333,1424,1425,1427,1429,1432,1434],{"class":335,"line":336},[333,1426,393],{"class":392},[333,1428,396],{"class":392},[333,1430,1431],{"class":399}," instructions",[333,1433,655],{"class":347},[333,1435,658],{"class":339},[333,1437,1438],{"class":335,"line":357},[333,1439,435],{"class":347},[333,1441,1442,1444,1446,1449,1451,1453],{"class":335,"line":382},[333,1443,668],{"class":667},[333,1445,853],{"class":347},[333,1447,1448],{"class":406},"PriceRange",[333,1450,679],{"class":347},[333,1452,682],{"class":399},[333,1454,1455],{"class":347},"()];\n",[333,1457,1458],{"class":335,"line":389},[333,1459,485],{"class":347},[322,1461,1464],{"className":779,"code":1462,"filename":1463,"language":782,"meta":328,"style":328},"{\n  \"search\": {\n    \"instructions\": [\n      {\"name\": \"price-range\", \"fields\": [{\"name\": \"max\", \"value\": 100}]}\n    ]\n  }\n}\n","POST \u002Fapi\u002Fproducts\u002Fsearch",[330,1465,1466,1470,1482,1494,1558,1562,1566],{"__ignoreMap":328},[333,1467,1468],{"class":335,"line":336},[333,1469,435],{"class":347},[333,1471,1472,1474,1476,1478,1480],{"class":335,"line":357},[333,1473,793],{"class":347},[333,1475,796],{"class":392},[333,1477,799],{"class":347},[333,1479,802],{"class":347},[333,1481,805],{"class":347},[333,1483,1484,1486,1488,1490,1492],{"class":335,"line":382},[333,1485,810],{"class":347},[333,1487,1085],{"class":406},[333,1489,799],{"class":347},[333,1491,802],{"class":347},[333,1493,671],{"class":347},[333,1495,1496,1498,1500,1502,1504,1506,1508,1511,1513,1515,1517,1519,1521,1523,1526,1528,1531,1533,1535,1537,1539,1541,1543,1545,1548,1550,1552,1555],{"class":335,"line":389},[333,1497,823],{"class":347},[333,1499,799],{"class":347},[333,1501,828],{"class":339},[333,1503,799],{"class":347},[333,1505,802],{"class":347},[333,1507,835],{"class":347},[333,1509,1510],{"class":457},"price-range",[333,1512,799],{"class":347},[333,1514,415],{"class":347},[333,1516,835],{"class":347},[333,1518,697],{"class":339},[333,1520,799],{"class":347},[333,1522,802],{"class":347},[333,1524,1525],{"class":347}," [{",[333,1527,799],{"class":347},[333,1529,828],{"class":1530},"swJcz",[333,1532,799],{"class":347},[333,1534,802],{"class":347},[333,1536,835],{"class":347},[333,1538,1289],{"class":457},[333,1540,799],{"class":347},[333,1542,415],{"class":347},[333,1544,835],{"class":347},[333,1546,1547],{"class":1530},"value",[333,1549,799],{"class":347},[333,1551,802],{"class":347},[333,1553,1554],{"class":339}," 100",[333,1556,1557],{"class":347},"}]}\n",[333,1559,1560],{"class":335,"line":432},[333,1561,888],{"class":347},[333,1563,1564],{"class":335,"line":438},[333,1565,893],{"class":347},[333,1567,1568],{"class":335,"line":482},[333,1569,485],{"class":347},[899,1571,1572,1587,1601,1628,1633,1638],{},[902,1573,1574,1576,1577,1580,1581,1583,1584,1586],{},[330,1575,828],{}," is the ",[330,1578,1579],{},"uriKey()"," of the instruction: by default, the class name without an ",[330,1582,1173],{}," suffix, in kebab case (",[330,1585,1510],{},").",[902,1588,1589,1591,1592,1595,1596,1598,1599,950],{},[330,1590,697],{}," is a list of ",[330,1593,1594],{},"{\"name\", \"value\"}"," entries. Each field is validated by its rules with the full Laravel validation, ",[330,1597,1303],{}," on a missing field included, and filled from its ",[330,1600,936],{},[902,1602,1603,1606,1607,1609,1610,1613,1614,1617,1618,1617,1621,1624,1625,950],{},[330,1604,1605],{},"handle()"," receives an ",[330,1608,1194],{},": read a value as a property (",[330,1611,1612],{},"$fields->max","), or with ",[330,1615,1616],{},"has()",", ",[330,1619,1620],{},"filled()",[330,1622,1623],{},"only()"," and ",[330,1626,1627],{},"toArray()",[902,1629,1630,1631,950],{},"Each instruction applies in its own group, joined to the rest of the search with ",[330,1632,972],{},[902,1634,980,1635,1637],{},[330,1636,1085],{}," too, with the instructions of the related resource.",[902,1639,1640,1642,1643,994,1645,950],{},[330,1641,988],{}," on an instruction adds keys to its entry in the ",[991,1644,993],{"href":173},[330,1646,1647],{},"with=instructions.meta",[999,1649,1651],{"id":1650},"aliases","Aliases",[313,1653,1654,1655,1657,1658,1661,1662,1664,1665,802],{},"Each entry of one ",[330,1656,1085],{}," list needs its own key: its ",[330,1659,1660],{},"alias",", or else its ",[330,1663,828],{},". To send one instruction twice, give one entry an ",[330,1666,1660],{},[322,1668,1670],{"className":779,"code":1669,"filename":1463,"language":782,"meta":328,"style":328},"{\n  \"search\": {\n    \"instructions\": [\n      {\"name\": \"price-range\", \"fields\": [{\"name\": \"max\", \"value\": 100}]},\n      {\"name\": \"price-range\", \"alias\": \"not_free\", \"fields\": [{\"name\": \"min\", \"value\": 1}, {\"name\": \"max\", \"value\": 1000}]}\n    ]\n  }\n}\n",[330,1671,1672,1676,1688,1700,1759,1868,1872,1876],{"__ignoreMap":328},[333,1673,1674],{"class":335,"line":336},[333,1675,435],{"class":347},[333,1677,1678,1680,1682,1684,1686],{"class":335,"line":357},[333,1679,793],{"class":347},[333,1681,796],{"class":392},[333,1683,799],{"class":347},[333,1685,802],{"class":347},[333,1687,805],{"class":347},[333,1689,1690,1692,1694,1696,1698],{"class":335,"line":382},[333,1691,810],{"class":347},[333,1693,1085],{"class":406},[333,1695,799],{"class":347},[333,1697,802],{"class":347},[333,1699,671],{"class":347},[333,1701,1702,1704,1706,1708,1710,1712,1714,1716,1718,1720,1722,1724,1726,1728,1730,1732,1734,1736,1738,1740,1742,1744,1746,1748,1750,1752,1754,1756],{"class":335,"line":389},[333,1703,823],{"class":347},[333,1705,799],{"class":347},[333,1707,828],{"class":339},[333,1709,799],{"class":347},[333,1711,802],{"class":347},[333,1713,835],{"class":347},[333,1715,1510],{"class":457},[333,1717,799],{"class":347},[333,1719,415],{"class":347},[333,1721,835],{"class":347},[333,1723,697],{"class":339},[333,1725,799],{"class":347},[333,1727,802],{"class":347},[333,1729,1525],{"class":347},[333,1731,799],{"class":347},[333,1733,828],{"class":1530},[333,1735,799],{"class":347},[333,1737,802],{"class":347},[333,1739,835],{"class":347},[333,1741,1289],{"class":457},[333,1743,799],{"class":347},[333,1745,415],{"class":347},[333,1747,835],{"class":347},[333,1749,1547],{"class":1530},[333,1751,799],{"class":347},[333,1753,802],{"class":347},[333,1755,1554],{"class":339},[333,1757,1758],{"class":347},"}]},\n",[333,1760,1761,1763,1765,1767,1769,1771,1773,1775,1777,1779,1781,1783,1785,1787,1789,1792,1794,1796,1798,1800,1802,1804,1806,1808,1810,1812,1814,1816,1818,1820,1822,1824,1826,1828,1830,1833,1836,1839,1841,1843,1845,1847,1849,1851,1853,1855,1857,1859,1861,1863,1866],{"class":335,"line":432},[333,1762,823],{"class":347},[333,1764,799],{"class":347},[333,1766,828],{"class":339},[333,1768,799],{"class":347},[333,1770,802],{"class":347},[333,1772,835],{"class":347},[333,1774,1510],{"class":457},[333,1776,799],{"class":347},[333,1778,415],{"class":347},[333,1780,835],{"class":347},[333,1782,1660],{"class":339},[333,1784,799],{"class":347},[333,1786,802],{"class":347},[333,1788,835],{"class":347},[333,1790,1791],{"class":457},"not_free",[333,1793,799],{"class":347},[333,1795,415],{"class":347},[333,1797,835],{"class":347},[333,1799,697],{"class":339},[333,1801,799],{"class":347},[333,1803,802],{"class":347},[333,1805,1525],{"class":347},[333,1807,799],{"class":347},[333,1809,828],{"class":1530},[333,1811,799],{"class":347},[333,1813,802],{"class":347},[333,1815,835],{"class":347},[333,1817,1260],{"class":457},[333,1819,799],{"class":347},[333,1821,415],{"class":347},[333,1823,835],{"class":347},[333,1825,1547],{"class":1530},[333,1827,799],{"class":347},[333,1829,802],{"class":347},[333,1831,1832],{"class":339}," 1",[333,1834,1835],{"class":347},"},",[333,1837,1838],{"class":347}," {",[333,1840,799],{"class":347},[333,1842,828],{"class":1530},[333,1844,799],{"class":347},[333,1846,802],{"class":347},[333,1848,835],{"class":347},[333,1850,1289],{"class":457},[333,1852,799],{"class":347},[333,1854,415],{"class":347},[333,1856,835],{"class":347},[333,1858,1547],{"class":1530},[333,1860,799],{"class":347},[333,1862,802],{"class":347},[333,1864,1865],{"class":339}," 1000",[333,1867,1557],{"class":347},[333,1869,1870],{"class":335,"line":438},[333,1871,888],{"class":347},[333,1873,1874],{"class":335,"line":482},[333,1875,893],{"class":347},[333,1877,1878],{"class":335,"line":488},[333,1879,485],{"class":347},[899,1881,1882,1889,1895,1901,1904],{},[902,1883,1884,1885,1888],{},"An alias looks like an identifier, ",[330,1886,1887],{},"^[A-Za-z_][A-Za-z0-9_]*$",", of at most 255 characters.",[902,1890,1891,1892],{},"The same instruction twice without an alias gives a 422 under each repeated entry: ",[330,1893,1894],{},"The search.instructions.1.alias field is required, because the key price-range is already used.",[902,1896,1897,1898],{},"An alias that another entry uses, as its alias or its name, gives ",[330,1899,1900],{},"The search.instructions.1.alias is already used by another instruction.",[902,1902,1903],{},"The rule holds at every level: includes, the search of an action and the search of a metric.",[902,1905,1906],{},"The alias keys the meta of the instruction, below.",[999,1908,1910],{"id":1909},"instruction-meta","Instruction meta",[313,1912,1913,1914,1917,1918,802],{},"An instruction can add an object to the ",[330,1915,1916],{},"meta"," of the search page with ",[330,1919,1920],{},"searchMeta()",[322,1922,1925],{"className":324,"code":1923,"filename":1924,"language":327,"meta":328,"style":328},"class Noted extends Instruction\n{\n    public function fields(): array\n    {\n        return [Integer::make('min_views')->nullable()];\n    }\n\n    public function handle(InstructionFields $fields, Builder $query): void\n    {\n        if ($fields->min_views !== null) {\n            $query->where('views', '>=', $fields->min_views);\n        }\n    }\n\n    public function searchMeta(InstructionFields $fields): array\n    {\n        if ($fields->min_views === null) {\n            return [];\n        }\n\n        return ['notice' => \"Lists the posts with {$fields->min_views} views or more.\"];\n    }\n}\n","app\u002FRest\u002FInstructions\u002FNoted.php",[330,1926,1927,1938,1942,1954,1958,1985,1989,1993,2021,2025,2048,2087,2092,2096,2100,2121,2125,2144,2152,2156,2160,2202,2207],{"__ignoreMap":328},[333,1928,1929,1931,1934,1936],{"class":335,"line":336},[333,1930,1205],{"class":392},[333,1932,1933],{"class":406}," Noted",[333,1935,1211],{"class":392},[333,1937,1214],{"class":406},[333,1939,1940],{"class":335,"line":357},[333,1941,435],{"class":347},[333,1943,1944,1946,1948,1950,1952],{"class":335,"line":382},[333,1945,1223],{"class":392},[333,1947,396],{"class":392},[333,1949,1228],{"class":399},[333,1951,655],{"class":347},[333,1953,658],{"class":339},[333,1955,1956],{"class":335,"line":389},[333,1957,1237],{"class":347},[333,1959,1960,1962,1964,1966,1968,1970,1972,1974,1976,1978,1980,1983],{"class":335,"line":432},[333,1961,1242],{"class":667},[333,1963,853],{"class":347},[333,1965,616],{"class":406},[333,1967,679],{"class":347},[333,1969,682],{"class":399},[333,1971,403],{"class":347},[333,1973,454],{"class":347},[333,1975,753],{"class":457},[333,1977,454],{"class":347},[333,1979,694],{"class":347},[333,1981,1982],{"class":399},"nullable",[333,1984,1455],{"class":347},[333,1986,1987],{"class":335,"line":438},[333,1988,1319],{"class":347},[333,1990,1991],{"class":335,"line":482},[333,1992,386],{"emptyLinePlaceholder":385},[333,1994,1995,1997,1999,2001,2003,2005,2007,2009,2011,2013,2015,2017,2019],{"class":335,"line":488},[333,1996,1223],{"class":392},[333,1998,396],{"class":392},[333,2000,1334],{"class":399},[333,2002,403],{"class":347},[333,2004,1194],{"class":406},[333,2006,409],{"class":347},[333,2008,697],{"class":343},[333,2010,415],{"class":347},[333,2012,1347],{"class":406},[333,2014,409],{"class":347},[333,2016,412],{"class":343},[333,2018,426],{"class":347},[333,2020,429],{"class":339},[333,2022,2023],{"class":335,"line":493},[333,2024,1237],{"class":347},[333,2026,2027,2030,2033,2035,2037,2040,2043,2046],{"class":335,"line":525},[333,2028,2029],{"class":667},"        if",[333,2031,2032],{"class":347}," ($",[333,2034,697],{"class":343},[333,2036,446],{"class":347},[333,2038,2039],{"class":343},"min_views ",[333,2041,2042],{"class":347},"!==",[333,2044,2045],{"class":347}," null)",[333,2047,805],{"class":347},[333,2049,2050,2053,2055,2057,2059,2061,2063,2065,2067,2069,2071,2073,2075,2077,2079,2081,2083,2085],{"class":335,"line":530},[333,2051,2052],{"class":347},"            $",[333,2054,412],{"class":343},[333,2056,446],{"class":347},[333,2058,449],{"class":399},[333,2060,403],{"class":347},[333,2062,454],{"class":347},[333,2064,545],{"class":457},[333,2066,454],{"class":347},[333,2068,415],{"class":347},[333,2070,465],{"class":347},[333,2072,468],{"class":457},[333,2074,454],{"class":347},[333,2076,415],{"class":347},[333,2078,409],{"class":347},[333,2080,697],{"class":343},[333,2082,446],{"class":347},[333,2084,753],{"class":343},[333,2086,479],{"class":347},[333,2088,2089],{"class":335,"line":566},[333,2090,2091],{"class":347},"        }\n",[333,2093,2094],{"class":335,"line":1310},[333,2095,1319],{"class":347},[333,2097,2098],{"class":335,"line":1316},[333,2099,386],{"emptyLinePlaceholder":385},[333,2101,2102,2104,2106,2109,2111,2113,2115,2117,2119],{"class":335,"line":1322},[333,2103,1223],{"class":392},[333,2105,396],{"class":392},[333,2107,2108],{"class":399}," searchMeta",[333,2110,403],{"class":347},[333,2112,1194],{"class":406},[333,2114,409],{"class":347},[333,2116,697],{"class":343},[333,2118,426],{"class":347},[333,2120,658],{"class":339},[333,2122,2123],{"class":335,"line":1327},[333,2124,1237],{"class":347},[333,2126,2127,2129,2131,2133,2135,2137,2140,2142],{"class":335,"line":1358},[333,2128,2029],{"class":667},[333,2130,2032],{"class":347},[333,2132,697],{"class":343},[333,2134,446],{"class":347},[333,2136,2039],{"class":343},[333,2138,2139],{"class":347},"===",[333,2141,2045],{"class":347},[333,2143,805],{"class":347},[333,2145,2146,2149],{"class":335,"line":1363},[333,2147,2148],{"class":667},"            return",[333,2150,2151],{"class":347}," [];\n",[333,2153,2154],{"class":335,"line":1409},[333,2155,2091],{"class":347},[333,2157,2158],{"class":335,"line":1414},[333,2159,386],{"emptyLinePlaceholder":385},[333,2161,2163,2165,2167,2169,2172,2174,2177,2179,2182,2185,2187,2189,2191,2194,2197,2199],{"class":335,"line":2162},21,[333,2164,1242],{"class":667},[333,2166,853],{"class":347},[333,2168,454],{"class":347},[333,2170,2171],{"class":457},"notice",[333,2173,454],{"class":347},[333,2175,2176],{"class":347}," =>",[333,2178,835],{"class":347},[333,2180,2181],{"class":457},"Lists the posts with ",[333,2183,2184],{"class":347},"{$",[333,2186,697],{"class":343},[333,2188,446],{"class":347},[333,2190,753],{"class":343},[333,2192,2193],{"class":347},"}",[333,2195,2196],{"class":457}," views or more.",[333,2198,799],{"class":347},[333,2200,2201],{"class":347},"];\n",[333,2203,2205],{"class":335,"line":2204},22,[333,2206,1319],{"class":347},[333,2208,2210],{"class":335,"line":2209},23,[333,2211,485],{"class":347},[322,2213,2215],{"className":779,"code":2214,"filename":781,"language":782,"meta":328,"style":328},"{\n  \"search\": {\n    \"instructions\": [\n      {\"name\": \"noted\", \"fields\": [{\"name\": \"min_views\", \"value\": 100}]},\n      {\"name\": \"noted\", \"alias\": \"busy\", \"fields\": [{\"name\": \"min_views\", \"value\": 200}]}\n    ]\n  }\n}\n",[330,2216,2217,2221,2233,2245,2304,2380,2384,2388],{"__ignoreMap":328},[333,2218,2219],{"class":335,"line":336},[333,2220,435],{"class":347},[333,2222,2223,2225,2227,2229,2231],{"class":335,"line":357},[333,2224,793],{"class":347},[333,2226,796],{"class":392},[333,2228,799],{"class":347},[333,2230,802],{"class":347},[333,2232,805],{"class":347},[333,2234,2235,2237,2239,2241,2243],{"class":335,"line":382},[333,2236,810],{"class":347},[333,2238,1085],{"class":406},[333,2240,799],{"class":347},[333,2242,802],{"class":347},[333,2244,671],{"class":347},[333,2246,2247,2249,2251,2253,2255,2257,2259,2262,2264,2266,2268,2270,2272,2274,2276,2278,2280,2282,2284,2286,2288,2290,2292,2294,2296,2298,2300,2302],{"class":335,"line":389},[333,2248,823],{"class":347},[333,2250,799],{"class":347},[333,2252,828],{"class":339},[333,2254,799],{"class":347},[333,2256,802],{"class":347},[333,2258,835],{"class":347},[333,2260,2261],{"class":457},"noted",[333,2263,799],{"class":347},[333,2265,415],{"class":347},[333,2267,835],{"class":347},[333,2269,697],{"class":339},[333,2271,799],{"class":347},[333,2273,802],{"class":347},[333,2275,1525],{"class":347},[333,2277,799],{"class":347},[333,2279,828],{"class":1530},[333,2281,799],{"class":347},[333,2283,802],{"class":347},[333,2285,835],{"class":347},[333,2287,753],{"class":457},[333,2289,799],{"class":347},[333,2291,415],{"class":347},[333,2293,835],{"class":347},[333,2295,1547],{"class":1530},[333,2297,799],{"class":347},[333,2299,802],{"class":347},[333,2301,1554],{"class":339},[333,2303,1758],{"class":347},[333,2305,2306,2308,2310,2312,2314,2316,2318,2320,2322,2324,2326,2328,2330,2332,2334,2337,2339,2341,2343,2345,2347,2349,2351,2353,2355,2357,2359,2361,2363,2365,2367,2369,2371,2373,2375,2378],{"class":335,"line":432},[333,2307,823],{"class":347},[333,2309,799],{"class":347},[333,2311,828],{"class":339},[333,2313,799],{"class":347},[333,2315,802],{"class":347},[333,2317,835],{"class":347},[333,2319,2261],{"class":457},[333,2321,799],{"class":347},[333,2323,415],{"class":347},[333,2325,835],{"class":347},[333,2327,1660],{"class":339},[333,2329,799],{"class":347},[333,2331,802],{"class":347},[333,2333,835],{"class":347},[333,2335,2336],{"class":457},"busy",[333,2338,799],{"class":347},[333,2340,415],{"class":347},[333,2342,835],{"class":347},[333,2344,697],{"class":339},[333,2346,799],{"class":347},[333,2348,802],{"class":347},[333,2350,1525],{"class":347},[333,2352,799],{"class":347},[333,2354,828],{"class":1530},[333,2356,799],{"class":347},[333,2358,802],{"class":347},[333,2360,835],{"class":347},[333,2362,753],{"class":457},[333,2364,799],{"class":347},[333,2366,415],{"class":347},[333,2368,835],{"class":347},[333,2370,1547],{"class":1530},[333,2372,799],{"class":347},[333,2374,802],{"class":347},[333,2376,2377],{"class":339}," 200",[333,2379,1557],{"class":347},[333,2381,2382],{"class":335,"line":438},[333,2383,888],{"class":347},[333,2385,2386],{"class":335,"line":482},[333,2387,893],{"class":347},[333,2389,2390],{"class":335,"line":488},[333,2391,485],{"class":347},[322,2393,2396],{"className":779,"code":2394,"filename":2395,"language":782,"meta":328,"style":328},"{\n  \"current_page\": 1,\n  \"data\": [...],\n  \"from\": 1,\n  \"last_page\": 1,\n  \"per_page\": 50,\n  \"to\": 1,\n  \"total\": 1,\n  \"meta\": {\n    \"instructions\": {\n      \"noted\": {\"notice\": \"Lists the posts with 100 views or more.\"},\n      \"busy\": {\"notice\": \"Lists the posts with 200 views or more.\"}\n    }\n  }\n}\n","200 OK",[330,2397,2398,2402,2418,2437,2452,2467,2483,2498,2513,2525,2537,2568,2597,2601,2605],{"__ignoreMap":328},[333,2399,2400],{"class":335,"line":336},[333,2401,435],{"class":347},[333,2403,2404,2406,2409,2411,2413,2415],{"class":335,"line":357},[333,2405,793],{"class":347},[333,2407,2408],{"class":392},"current_page",[333,2410,799],{"class":347},[333,2412,802],{"class":347},[333,2414,1832],{"class":339},[333,2416,2417],{"class":347},",\n",[333,2419,2420,2422,2425,2427,2429,2431,2434],{"class":335,"line":382},[333,2421,793],{"class":347},[333,2423,2424],{"class":392},"data",[333,2426,799],{"class":347},[333,2428,802],{"class":347},[333,2430,853],{"class":347},[333,2432,2433],{"class":343},"...",[333,2435,2436],{"class":347},"],\n",[333,2438,2439,2441,2444,2446,2448,2450],{"class":335,"line":389},[333,2440,793],{"class":347},[333,2442,2443],{"class":392},"from",[333,2445,799],{"class":347},[333,2447,802],{"class":347},[333,2449,1832],{"class":339},[333,2451,2417],{"class":347},[333,2453,2454,2456,2459,2461,2463,2465],{"class":335,"line":432},[333,2455,793],{"class":347},[333,2457,2458],{"class":392},"last_page",[333,2460,799],{"class":347},[333,2462,802],{"class":347},[333,2464,1832],{"class":339},[333,2466,2417],{"class":347},[333,2468,2469,2471,2474,2476,2478,2481],{"class":335,"line":438},[333,2470,793],{"class":347},[333,2472,2473],{"class":392},"per_page",[333,2475,799],{"class":347},[333,2477,802],{"class":347},[333,2479,2480],{"class":339}," 50",[333,2482,2417],{"class":347},[333,2484,2485,2487,2490,2492,2494,2496],{"class":335,"line":482},[333,2486,793],{"class":347},[333,2488,2489],{"class":392},"to",[333,2491,799],{"class":347},[333,2493,802],{"class":347},[333,2495,1832],{"class":339},[333,2497,2417],{"class":347},[333,2499,2500,2502,2505,2507,2509,2511],{"class":335,"line":488},[333,2501,793],{"class":347},[333,2503,2504],{"class":392},"total",[333,2506,799],{"class":347},[333,2508,802],{"class":347},[333,2510,1832],{"class":339},[333,2512,2417],{"class":347},[333,2514,2515,2517,2519,2521,2523],{"class":335,"line":493},[333,2516,793],{"class":347},[333,2518,1916],{"class":392},[333,2520,799],{"class":347},[333,2522,802],{"class":347},[333,2524,805],{"class":347},[333,2526,2527,2529,2531,2533,2535],{"class":335,"line":525},[333,2528,810],{"class":347},[333,2530,1085],{"class":406},[333,2532,799],{"class":347},[333,2534,802],{"class":347},[333,2536,805],{"class":347},[333,2538,2539,2542,2544,2546,2548,2550,2552,2554,2556,2558,2560,2563,2565],{"class":335,"line":530},[333,2540,2541],{"class":347},"      \"",[333,2543,2261],{"class":339},[333,2545,799],{"class":347},[333,2547,802],{"class":347},[333,2549,1838],{"class":347},[333,2551,799],{"class":347},[333,2553,2171],{"class":1530},[333,2555,799],{"class":347},[333,2557,802],{"class":347},[333,2559,835],{"class":347},[333,2561,2562],{"class":457},"Lists the posts with 100 views or more.",[333,2564,799],{"class":347},[333,2566,2567],{"class":347},"},\n",[333,2569,2570,2572,2574,2576,2578,2580,2582,2584,2586,2588,2590,2593,2595],{"class":335,"line":566},[333,2571,2541],{"class":347},[333,2573,2336],{"class":339},[333,2575,799],{"class":347},[333,2577,802],{"class":347},[333,2579,1838],{"class":347},[333,2581,799],{"class":347},[333,2583,2171],{"class":1530},[333,2585,799],{"class":347},[333,2587,802],{"class":347},[333,2589,835],{"class":347},[333,2591,2592],{"class":457},"Lists the posts with 200 views or more.",[333,2594,799],{"class":347},[333,2596,485],{"class":347},[333,2598,2599],{"class":335,"line":1310},[333,2600,1319],{"class":347},[333,2602,2603],{"class":335,"line":1316},[333,2604,893],{"class":347},[333,2606,2607],{"class":335,"line":1322},[333,2608,485],{"class":347},[899,2610,2611,2621,2631,2634],{},[902,2612,2613,2614,2617,2618,2620],{},"Each instruction at the root of the search adds its object under ",[330,2615,2616],{},"meta.instructions",", keyed by the ",[330,2619,1660],{}," of its entry, or else its name.",[902,2622,2623,2624,2627,2628,2630],{},"An instruction that returns ",[330,2625,2626],{},"[]"," adds nothing, and ",[330,2629,1085],{}," is left out when no instruction adds anything.",[902,2632,2633],{},"The instructions of an include add nothing.",[902,2635,2636,2638,2639,2642,2643,2645,2646,950],{},[330,2637,2616],{}," comes after the ",[330,2640,2641],{},"create"," gate and the keys of the resource's ",[330,2644,1920],{},", see ",[991,2647,2649],{"href":2648},"\u002Fsearch\u002Foverview#meta","Meta",[999,2651,2653],{"id":2652},"instruction-errors","Instruction errors",[1004,2655,2656,2664],{},[1007,2657,2658],{},[1010,2659,2660,2662],{},[1013,2661,1015],{},[1013,2663,1018],{},[1020,2665,2666,2676,2686,2696,2710],{},[1010,2667,2668,2673],{},[1025,2669,2670],{},[330,2671,2672],{},"The selected search.instructions.0.name is invalid.",[1025,2674,2675],{},"An instruction that the resource does not declare",[1010,2677,2678,2683],{},[1025,2679,2680],{},[330,2681,2682],{},"The selected search.instructions.0.fields.0.name is invalid.",[1025,2684,2685],{},"A field that the instruction does not declare",[1010,2687,2688,2693],{},[1025,2689,2690],{},[330,2691,2692],{},"The search.instructions.0.fields.1.name field has a duplicate value.",[1025,2694,2695],{},"A field name sent twice",[1010,2697,2698,2703],{},[1025,2699,2700],{},[330,2701,2702],{},"The price field must be an integer.",[1025,2704,2705,2706,2709],{},"Under ",[330,2707,2708],{},"search.instructions.0.fields.price",": a value that the rules of the field refuse",[1010,2711,2712,2717],{},[1025,2713,2714],{},[330,2715,2716],{},"The search.instructions.0.fields field must be a list.",[1025,2718,2719,2721],{},[330,2720,697],{}," sent as an object",[313,2723,2724,2725,2728,2729,950],{},"Field errors go under ",[330,2726,2727],{},"search.instructions.{index}.fields.{name}",", with the label of the field. Custom translation lines go under ",[330,2730,2731],{},"validation.custom.search.instructions.*.fields.{name}.{rule}",[999,2733,2735],{"id":2734},"instructions-on-a-search-engine","Instructions on a search engine",[313,2737,2738,2739,2742,2743,2746,2747,950],{},"An instruction that implements ",[330,2740,2741],{},"Lomkit\\Rest\\Instructions\\AppliesToEngine"," also runs next to a text search on a search engine, through ",[330,2744,2745],{},"handleEngine()",". See ",[991,2748,92],{"href":2749},"\u002Fsearch\u002Fsearch-engines#instructions",[317,2751,58],{"id":2752},"limits",[1004,2754,2755,2765],{},[1007,2756,2757],{},[1010,2758,2759,2762],{},[1013,2760,2761],{},"Limit",[1013,2763,2764],{},"Default",[1020,2766,2767,2777,2787],{},[1010,2768,2769,2774],{},[1025,2770,2771],{},[330,2772,2773],{},"rest.limits.sizes.scopes",[1025,2775,2776],{},"10 scopes per list",[1010,2778,2779,2784],{},[1025,2780,2781],{},[330,2782,2783],{},"rest.limits.sizes.instructions",[1025,2785,2786],{},"10 instructions per list",[1010,2788,2789,2794],{},[1025,2790,2791],{},[330,2792,2793],{},"rest.limits.sizes.fields",[1025,2795,2796],{},"100 fields per instruction",[313,2798,2799,2800,2802],{},"The ",[330,2801,846],{}," of a scope keep their own limit: one value per field of the scope.",[2804,2805,2806],"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 .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 .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 .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":328,"searchDepth":336,"depth":357,"links":2808},[2809,2812,2818],{"id":319,"depth":357,"text":320,"children":2810},[2811],{"id":1001,"depth":382,"text":1002},{"id":1085,"depth":357,"text":283,"children":2813},[2814,2815,2816,2817],{"id":1650,"depth":382,"text":1651},{"id":1909,"depth":382,"text":1910},{"id":2652,"depth":382,"text":2653},{"id":2734,"depth":382,"text":2735},{"id":2752,"depth":357,"text":58},"Let clients call the local scopes of a model and the instructions of a resource, with typed parameters, aliases and search meta.","md",null,{},{"title":84,"description":2819},{"loc":85},"ut4XxDFylvJOK4ewjggLqRMZv2RXEuPcwVNls9QiL3w",[2827,2829],{"title":80,"path":81,"stem":82,"description":2828,"children":-1},"Load related rows with their own search and a limit per parent, read @more, and add count, exists, min, max, avg and sum values of relations.",{"title":88,"path":89,"stem":90,"description":2830,"children":-1},"Declare the text search of a resource with LIKE or the full-text index of the database, pick a mode per request and sort by relevance.",1794181351409]