[{"data":1,"prerenderedAt":1269},["ShallowReactive",2],{"navigation":3,"\u002Fintegrations\u002Flaravel-rest-api":173,"\u002Fintegrations\u002Flaravel-rest-api-surround":1264},[4,27,69,103,113,135],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Getting Started","i-heroicons-star","\u002Fgetting-started","1.getting-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":23,"path":24,"stem":25},"Upgrade guide","\u002Fgetting-started\u002Fupgrade-guide","1.getting-started\u002F5.upgrade-guide",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Essentials","i-heroicons-shield-check","\u002Fessentials","2.essentials",[33,37,41,45,49,53,57,61,65],{"title":34,"path":35,"stem":36},"Controls","\u002Fessentials\u002Fcontrols","2.essentials\u002F1.controls",{"title":38,"path":39,"stem":40},"Perimeters","\u002Fessentials\u002Fperimeters","2.essentials\u002F2.perimeters",{"title":42,"path":43,"stem":44},"Perimeter classes","\u002Fessentials\u002Fperimeter-classes","2.essentials\u002F3.perimeter-classes",{"title":46,"path":47,"stem":48},"Levels","\u002Fessentials\u002Flevels","2.essentials\u002F4.levels",{"title":50,"path":51,"stem":52},"Boundaries","\u002Fessentials\u002Fboundaries","2.essentials\u002F5.boundaries",{"title":54,"path":55,"stem":56},"Parents","\u002Fessentials\u002Fparents","2.essentials\u002F6.parents",{"title":58,"path":59,"stem":60},"Policies","\u002Fessentials\u002Fpolicies","2.essentials\u002F7.policies",{"title":62,"path":63,"stem":64},"Queries","\u002Fessentials\u002Fqueries","2.essentials\u002F8.queries",{"title":66,"path":67,"stem":68},"Readers","\u002Fessentials\u002Freaders","2.essentials\u002F9.readers",{"title":70,"icon":71,"path":72,"stem":73,"children":74,"page":26},"Search","i-heroicons-magnifying-glass","\u002Fsearch","3.search",[75,79,83,87,91,95,99],{"title":76,"path":77,"stem":78},"Search overview","\u002Fsearch\u002Foverview","3.search\u002F1.overview",{"title":80,"path":81,"stem":82},"Engines","\u002Fsearch\u002Fengines","3.search\u002F2.engines",{"title":84,"path":85,"stem":86},"Keeping the keys fresh","\u002Fsearch\u002Fkeeping-the-keys-fresh","3.search\u002F3.keeping-the-keys-fresh",{"title":88,"path":89,"stem":90},"Exceptions and dates","\u002Fsearch\u002Fexceptions-and-dates","3.search\u002F4.exceptions-and-dates",{"title":92,"path":93,"stem":94},"Searching through a parent","\u002Fsearch\u002Fthrough-a-parent","3.search\u002F5.through-a-parent",{"title":96,"path":97,"stem":98},"Search from the browser","\u002Fsearch\u002Ffrom-the-browser","3.search\u002F6.from-the-browser",{"title":100,"path":101,"stem":102},"Your own search client","\u002Fsearch\u002Fyour-own-client","3.search\u002F7.your-own-client",{"title":104,"icon":105,"path":106,"stem":107,"children":108,"page":26},"Integrations","i-heroicons-puzzle-piece","\u002Fintegrations","4.integrations",[109],{"title":110,"path":111,"stem":112},"laravel-rest-api","\u002Fintegrations\u002Flaravel-rest-api","4.integrations\u002F1.laravel-rest-api",{"title":114,"icon":115,"path":116,"stem":117,"children":118,"page":26},"Testing and Tooling","i-heroicons-wrench-screwdriver","\u002Ftesting-and-tooling","5.testing-and-tooling",[119,123,127,131],{"title":120,"path":121,"stem":122},"Testing","\u002Ftesting-and-tooling\u002Ftesting","5.testing-and-tooling\u002F1.testing",{"title":124,"path":125,"stem":126},"access:check","\u002Ftesting-and-tooling\u002Faccess-check","5.testing-and-tooling\u002F2.access-check",{"title":128,"path":129,"stem":130},"Cache and about","\u002Ftesting-and-tooling\u002Fcache-and-about","5.testing-and-tooling\u002F3.cache-and-about",{"title":132,"path":133,"stem":134},"Generators","\u002Ftesting-and-tooling\u002Fgenerators","5.testing-and-tooling\u002F4.generators",{"title":136,"icon":137,"path":138,"stem":139,"children":140,"page":26},"Digging Deeper","i-heroicons-list-bullet","\u002Fdigging-deeper","6.digging-deeper",[141,145,149,153,157,161,165,169],{"title":142,"path":143,"stem":144},"Abilities","\u002Fdigging-deeper\u002Fabilities","6.digging-deeper\u002F1.abilities",{"title":146,"path":147,"stem":148},"Kept decisions","\u002Fdigging-deeper\u002Fdecisions","6.digging-deeper\u002F2.decisions",{"title":150,"path":151,"stem":152},"Batched decisions","\u002Fdigging-deeper\u002Fbatched-decisions","6.digging-deeper\u002F3.batched-decisions",{"title":154,"path":155,"stem":156},"Row checks","\u002Fdigging-deeper\u002Frow-checks","6.digging-deeper\u002F4.row-checks",{"title":158,"path":159,"stem":160},"Several brands","\u002Fdigging-deeper\u002Fseveral-brands","6.digging-deeper\u002F5.several-brands",{"title":162,"path":163,"stem":164},"Row context","\u002Fdigging-deeper\u002Frow-context","6.digging-deeper\u002F6.row-context",{"title":166,"path":167,"stem":168},"What is public in 1.x","\u002Fdigging-deeper\u002Fpublic-api","6.digging-deeper\u002F7.public-api",{"title":170,"path":171,"stem":172},"Use with AI","\u002Fdigging-deeper\u002Fuse-with-ai","6.digging-deeper\u002F8.use-with-ai",{"id":174,"title":110,"body":175,"description":1253,"extension":1254,"links":1255,"meta":1259,"navigation":249,"path":111,"seo":1260,"sitemap":1261,"stem":112,"updatedAt":1262,"__hash__":1263},"docs\u002F4.integrations\u002F1.laravel-rest-api.md",{"type":176,"value":177,"toc":1243},"minimark",[178,373,396,402,407,418,445,455,478,483,492,832,836,849,901,907,910,928,960,963,978,1036,1040,1060,1132,1136,1150,1207,1225,1230,1239],[179,180,186],"pre",{"className":181,"code":182,"filename":183,"language":184,"meta":185,"style":185},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Lomkit\\Rest\\Text\\ScoutEngine;\nuse Lomkit\\Rest\\Text\\TextSearch;\n\nclass PostResource extends Resource\n{\n    public static string $model = Post::class;\n\n    public function text(): ?TextSearch\n    {\n        return ScoutEngine::make()->withoutPerimeter();\n    }\n}\n","app\u002FRest\u002FResources\u002FPostResource.php","php","",[187,188,189,222,244,251,268,274,305,310,331,337,361,367],"code",{"__ignoreMap":185},[190,191,194,198,202,206,209,211,214,216,219],"span",{"class":192,"line":193},"line",1,[190,195,197],{"class":196},"sbssI","use",[190,199,201],{"class":200},"sTEyZ"," Lomkit",[190,203,205],{"class":204},"sMK4o","\\",[190,207,208],{"class":200},"Rest",[190,210,205],{"class":204},[190,212,213],{"class":200},"Text",[190,215,205],{"class":204},[190,217,218],{"class":200},"ScoutEngine",[190,220,221],{"class":204},";\n",[190,223,225,227,229,231,233,235,237,239,242],{"class":192,"line":224},2,[190,226,197],{"class":196},[190,228,201],{"class":200},[190,230,205],{"class":204},[190,232,208],{"class":200},[190,234,205],{"class":204},[190,236,213],{"class":200},[190,238,205],{"class":204},[190,240,241],{"class":200},"TextSearch",[190,243,221],{"class":204},[190,245,247],{"class":192,"line":246},3,[190,248,250],{"emptyLinePlaceholder":249},true,"\n",[190,252,254,258,262,265],{"class":192,"line":253},4,[190,255,257],{"class":256},"spNyl","class",[190,259,261],{"class":260},"sBMFI"," PostResource",[190,263,264],{"class":256}," extends",[190,266,267],{"class":260}," Resource\n",[190,269,271],{"class":192,"line":270},5,[190,272,273],{"class":204},"{\n",[190,275,277,280,283,286,289,292,295,298,301,303],{"class":192,"line":276},6,[190,278,279],{"class":256},"    public",[190,281,282],{"class":256}," static",[190,284,285],{"class":196}," string",[190,287,288],{"class":204}," $",[190,290,291],{"class":200},"model ",[190,293,294],{"class":204},"=",[190,296,297],{"class":260}," Post",[190,299,300],{"class":204},"::",[190,302,257],{"class":196},[190,304,221],{"class":204},[190,306,308],{"class":192,"line":307},7,[190,309,250],{"emptyLinePlaceholder":249},[190,311,313,315,318,322,325,328],{"class":192,"line":312},8,[190,314,279],{"class":256},[190,316,317],{"class":256}," function",[190,319,321],{"class":320},"s2Zo4"," text",[190,323,324],{"class":204},"():",[190,326,327],{"class":204}," ?",[190,329,330],{"class":260},"TextSearch\n",[190,332,334],{"class":192,"line":333},9,[190,335,336],{"class":204},"    {\n",[190,338,340,344,347,349,352,355,358],{"class":192,"line":339},10,[190,341,343],{"class":342},"s7zQu","        return",[190,345,346],{"class":260}," ScoutEngine",[190,348,300],{"class":204},[190,350,351],{"class":320},"make",[190,353,354],{"class":204},"()->",[190,356,357],{"class":320},"withoutPerimeter",[190,359,360],{"class":204},"();\n",[190,362,364],{"class":192,"line":363},11,[190,365,366],{"class":204},"    }\n",[190,368,370],{"class":192,"line":369},12,[190,371,372],{"class":204},"}\n",[374,375,376,377,383,384,387,388,391,392,395],"p",{},"With ",[378,379,110],"a",{"href":380,"rel":381},"https:\u002F\u002Flaravel-rest-api.lomkit.com",[382],"nofollow"," 3.6 or higher installed, the package registers ",[187,385,386],{},"Lomkit\\Access\\Integrations\\RestApi\\AccessControlExtension"," on its own. It applies to every rest-api resource whose model has a control, and leaves the others alone: nothing to write in the resources, no ",[187,389,390],{},"perimeterQuery()"," that calls ",[187,393,394],{},"controlled()",".",[374,397,398,399,395],{},"The package conflicts with laravel-rest-api before 3.6, which has no extensions. The extension is named ",[187,400,401],{},"access_control",[403,404,406],"h2",{"id":405},"rows","Rows",[374,408,409,410,413,414,417],{},"The rows of a resource are the rows that ",[187,411,412],{},"controlledFor($user)"," finds for ",[187,415,416],{},"view",", wherever rest-api applies a perimeter:",[419,420,421,425,428],"ul",{},[422,423,424],"li",{},"searches, includes, relation filters, sorts and aggregates;",[422,426,427],{},"metrics and the keys of their cache;",[422,429,430,431,434,435,434,438,434,441,444],{},"the key lookups of ",[187,432,433],{},"mutate",", ",[187,436,437],{},"destroy",[187,439,440],{},"restore",[187,442,443],{},"forceDestroy"," and actions, the rows of queued actions and the rows read again after a write.",[374,446,447,448,450,451,454],{},"A guest finds no row, as with ",[187,449,394],{},". A user that is not an Eloquent model throws ",[187,452,453],{},"InvalidRestReaderException",", which names its class.",[374,456,457,460,461,463,464,467,468,471,472,477],{},[187,458,459],{},"php artisan rest:check"," accepts a controlled resource without ",[187,462,390],{}," or ",[187,465,466],{},"#[WithoutPerimeter]",": the extension provides its perimeter, shown as ",[187,469,470],{},"perimeter from access_control",". It also reports a control that cannot be built. rest-api itself still reports a model without a policy: call ",[378,473,474],{"href":59},[187,475,476],{},"Access::registerPolicies()"," or give the model a policy.",[479,480,482],"h3",{"id":481},"conditions-that-are-not-access-rules","Conditions that are not access rules",[374,484,485,486,488,489,491],{},"Keep the conditions that are not access rules, such as a published flag, in ",[187,487,390],{}," for the SQL lists and in the perimeter of ",[187,490,218],{}," for the text searches. rest-api applies both, and the extension adds its restriction to them:",[179,493,495],{"className":181,"code":494,"language":184,"meta":185,"style":185},"use Illuminate\\Contracts\\Database\\Eloquent\\Builder;\nuse Lomkit\\Rest\\Fields\\Boolean;\nuse Lomkit\\Rest\\Text\\Engine\\EngineQuery;\nuse Lomkit\\Rest\\Text\\ScoutEngine;\nuse Lomkit\\Rest\\Text\\TextSearch;\n\nclass PostResource extends Resource\n{\n    public function perimeterQuery(Builder $query): Builder\n    {\n        return $query->where('published', true);\n    }\n\n    public function text(): ?TextSearch\n    {\n        return ScoutEngine::make()\n            ->perimeter(fn (EngineQuery $query) => $query->where('published', '=', true))\n            ->indexAttributes([Boolean::make('published')]);\n    }\n}\n",[187,496,497,526,548,574,594,614,618,628,632,657,661,692,696,701,716,721,735,794,822,827],{"__ignoreMap":185},[190,498,499,501,504,506,509,511,514,516,519,521,524],{"class":192,"line":193},[190,500,197],{"class":196},[190,502,503],{"class":200}," Illuminate",[190,505,205],{"class":204},[190,507,508],{"class":200},"Contracts",[190,510,205],{"class":204},[190,512,513],{"class":200},"Database",[190,515,205],{"class":204},[190,517,518],{"class":200},"Eloquent",[190,520,205],{"class":204},[190,522,523],{"class":200},"Builder",[190,525,221],{"class":204},[190,527,528,530,532,534,536,538,541,543,546],{"class":192,"line":224},[190,529,197],{"class":196},[190,531,201],{"class":200},[190,533,205],{"class":204},[190,535,208],{"class":200},[190,537,205],{"class":204},[190,539,540],{"class":200},"Fields",[190,542,205],{"class":204},[190,544,545],{"class":200},"Boolean",[190,547,221],{"class":204},[190,549,550,552,554,556,558,560,562,564,567,569,572],{"class":192,"line":246},[190,551,197],{"class":196},[190,553,201],{"class":200},[190,555,205],{"class":204},[190,557,208],{"class":200},[190,559,205],{"class":204},[190,561,213],{"class":200},[190,563,205],{"class":204},[190,565,566],{"class":200},"Engine",[190,568,205],{"class":204},[190,570,571],{"class":200},"EngineQuery",[190,573,221],{"class":204},[190,575,576,578,580,582,584,586,588,590,592],{"class":192,"line":253},[190,577,197],{"class":196},[190,579,201],{"class":200},[190,581,205],{"class":204},[190,583,208],{"class":200},[190,585,205],{"class":204},[190,587,213],{"class":200},[190,589,205],{"class":204},[190,591,218],{"class":200},[190,593,221],{"class":204},[190,595,596,598,600,602,604,606,608,610,612],{"class":192,"line":270},[190,597,197],{"class":196},[190,599,201],{"class":200},[190,601,205],{"class":204},[190,603,208],{"class":200},[190,605,205],{"class":204},[190,607,213],{"class":200},[190,609,205],{"class":204},[190,611,241],{"class":200},[190,613,221],{"class":204},[190,615,616],{"class":192,"line":276},[190,617,250],{"emptyLinePlaceholder":249},[190,619,620,622,624,626],{"class":192,"line":307},[190,621,257],{"class":256},[190,623,261],{"class":260},[190,625,264],{"class":256},[190,627,267],{"class":260},[190,629,630],{"class":192,"line":312},[190,631,273],{"class":204},[190,633,634,636,638,641,644,646,648,651,654],{"class":192,"line":333},[190,635,279],{"class":256},[190,637,317],{"class":256},[190,639,640],{"class":320}," perimeterQuery",[190,642,643],{"class":204},"(",[190,645,523],{"class":260},[190,647,288],{"class":204},[190,649,650],{"class":200},"query",[190,652,653],{"class":204},"):",[190,655,656],{"class":260}," Builder\n",[190,658,659],{"class":192,"line":339},[190,660,336],{"class":204},[190,662,663,665,667,669,672,675,677,680,684,686,689],{"class":192,"line":363},[190,664,343],{"class":342},[190,666,288],{"class":204},[190,668,650],{"class":200},[190,670,671],{"class":204},"->",[190,673,674],{"class":320},"where",[190,676,643],{"class":204},[190,678,679],{"class":204},"'",[190,681,683],{"class":682},"sfazB","published",[190,685,679],{"class":204},[190,687,688],{"class":204},",",[190,690,691],{"class":204}," true);\n",[190,693,694],{"class":192,"line":369},[190,695,366],{"class":204},[190,697,699],{"class":192,"line":698},13,[190,700,250],{"emptyLinePlaceholder":249},[190,702,704,706,708,710,712,714],{"class":192,"line":703},14,[190,705,279],{"class":256},[190,707,317],{"class":256},[190,709,321],{"class":320},[190,711,324],{"class":204},[190,713,327],{"class":204},[190,715,330],{"class":260},[190,717,719],{"class":192,"line":718},15,[190,720,336],{"class":204},[190,722,724,726,728,730,732],{"class":192,"line":723},16,[190,725,343],{"class":342},[190,727,346],{"class":260},[190,729,300],{"class":204},[190,731,351],{"class":320},[190,733,734],{"class":204},"()\n",[190,736,738,741,744,746,749,752,754,756,758,761,764,766,768,770,772,774,776,778,780,782,785,787,789,791],{"class":192,"line":737},17,[190,739,740],{"class":204},"            ->",[190,742,743],{"class":320},"perimeter",[190,745,643],{"class":204},[190,747,748],{"class":256},"fn",[190,750,751],{"class":204}," (",[190,753,571],{"class":260},[190,755,288],{"class":204},[190,757,650],{"class":200},[190,759,760],{"class":204},")",[190,762,763],{"class":204}," =>",[190,765,288],{"class":204},[190,767,650],{"class":200},[190,769,671],{"class":204},[190,771,674],{"class":320},[190,773,643],{"class":204},[190,775,679],{"class":204},[190,777,683],{"class":682},[190,779,679],{"class":204},[190,781,688],{"class":204},[190,783,784],{"class":204}," '",[190,786,294],{"class":682},[190,788,679],{"class":204},[190,790,688],{"class":204},[190,792,793],{"class":204}," true))\n",[190,795,797,799,802,805,807,809,811,813,815,817,819],{"class":192,"line":796},18,[190,798,740],{"class":204},[190,800,801],{"class":320},"indexAttributes",[190,803,804],{"class":204},"([",[190,806,545],{"class":260},[190,808,300],{"class":204},[190,810,351],{"class":320},[190,812,643],{"class":204},[190,814,679],{"class":204},[190,816,683],{"class":682},[190,818,679],{"class":204},[190,820,821],{"class":204},")]);\n",[190,823,825],{"class":192,"line":824},19,[190,826,366],{"class":204},[190,828,830],{"class":192,"line":829},20,[190,831,372],{"class":204},[403,833,835],{"id":834},"text-search","Text search",[374,837,838,839,841,842,844,845,848],{},"rest-api builds its own Scout query, so ",[187,840,394],{}," never runs there: the extension is the access filter of these searches. A resource searched through ",[187,843,218],{}," declares ",[187,846,847],{},"withoutPerimeter()",", or a perimeter for its other conditions, as above.",[419,850,851,862,883],{},[422,852,853,854,857,858,861],{},"On the Scout ",[187,855,856],{},"database"," and ",[187,859,860],{},"collection"," drivers, the rows are restricted in the SQL of the search, with an exact total.",[422,863,864,865,868,869,857,872,875,876,878,879,395],{},"On another engine, the model uses ",[187,866,867],{},"ControlledSearchable",", and the extension keeps the documents that share a key with the reader in ",[187,870,871],{},"_access",[187,873,874],{},"_boundary",", as ",[187,877,394],{}," does. A guest or a reader that no perimeter reaches gets an empty page without calling the engine. Declare the two attributes in the ",[378,880,882],{"href":881},"\u002Fsearch\u002Fengines#index-settings","index settings",[422,884,885,886,889,890,892,893,896,897,900],{},"The search throws ",[187,887,888],{},"UnsupportedRestSearchException"," when the model does not use ",[187,891,867],{},", when the engine is not supported or trusted, and when the rest-api profile of the engine matches no list of strings. A boundary without a search form throws ",[187,894,895],{},"UnsearchableBoundaryException",". ",[187,898,899],{},"rest:check"," reports the first two cases and the boundary, with the Scout driver of its environment.",[374,902,903,904,395],{},"The engine is the only barrier: rest-api loads the rows of the page by key, without the SQL restriction, so a row that a stale index still matches is shown until it is indexed again. ",[378,905,906],{"href":85},"Keep the keys fresh",[403,908,154],{"id":909},"row-checks",[374,911,912,913,919,920,923,924,927],{},"Before the policies check rows for an ability, the extension preloads their decisions with ",[378,914,916],{"href":915},"\u002Fdigging-deeper\u002Fbatched-decisions#preloading-loaded-rows",[187,917,918],{},"Access::preload()",", so the gates of a page cost one query per ability, not one per row and ability. It decides nothing itself: the policy still decides each row. The ability goes through ",[187,921,922],{},"abilityFor()"," of the control, so a business gate such as ",[187,925,926],{},"approve"," is preloaded too.",[374,929,930,931,934,935,939,940,942,943,946,947,950,951,954,955,957,958,395],{},"rest-api checks ",[187,932,933],{},"create"," on the class, then on the ",[378,936,938],{"href":937},"\u002Fessentials\u002Fpolicies#drafts","draft"," of each row that ",[187,941,433],{}," creates. A draft is judged in memory only: a perimeter with a ",[187,944,945],{},"should()"," callback or an ",[187,948,949],{},"includes()"," hook, an unrestricted perimeter, or a ",[187,952,953],{},"ThroughParent"," that delegates ",[187,956,933],{}," can grant it. A control whose perimeters are all checked in SQL refuses every creation, and so does a boundary without an in-memory form, such as a boundary class without ",[187,959,949],{},[403,961,146],{"id":962},"kept-decisions",[374,964,965,966,973,974,977],{},"rest-api keeps the decisions of the abilities that a resource lists in ",[378,967,970],{"href":968,"rel":969},"https:\u002F\u002Flaravel-rest-api.lomkit.com\u002Fauthorization\u002Fdecision-cache",[382],[187,971,972],{},"authorizationCache()",", filed under the ",[187,975,976],{},"updated_at"," of the row.",[419,979,980,988,1000,1014],{},[422,981,982,983,987],{},"The extension adds a hash of the ",[378,984,986],{"href":985},"\u002Fessentials\u002Freaders#the-decision-context","decision context"," to their key, so a decision kept for one tenant is never read for another.",[422,989,990,991,993,994,996,997,999],{},"For an ability that a ",[187,992,953],{}," delegates, it adds the ",[187,995,976],{}," of the parent, and of each parent above it, with one query per level for the rows of a page. When a parent changes, the decisions on its children are made again. A parent without ",[187,998,976],{}," keeps no decision on its children.",[422,1001,1002,1003,1006,1007,1010,1011,1013],{},"A parent written with ",[187,1004,1005],{},"DB::table()"," or inside ",[187,1008,1009],{},"Model::withoutTimestamps()"," keeps its ",[187,1012,976],{},", and the old decisions stay until the duration runs out.",[422,1015,1016,1017,1020,1021,1025,1026,1028,1029,1031,1032,1035],{},"A perimeter whose ",[187,1018,1019],{},"query()"," reads another table, or a right that holds during a ",[378,1022,1024],{"href":1023},"\u002Fsearch\u002Fexceptions-and-dates#rights-that-depend-on-the-date","period",", changes no ",[187,1027,976],{},": leave these abilities out of ",[187,1030,972],{},", shorten their duration, or call ",[187,1033,1034],{},"Rest::forgetAuthorizations()"," when that table changes.",[403,1037,1039],{"id":1038},"columns","Columns",[374,1041,1042,1043,1046,1047,1050,1051,1053,1054,1056,1057,1059],{},"rest-api loads the columns of the fields and of ",[187,1044,1045],{},"alwaysSelect()",", and a policy that reads another column throws ",[187,1048,1049],{},"MissingColumnException",". List in ",[187,1052,1045],{}," the columns that the control reads in memory: the column and the read-only columns of the boundary, the columns of the ",[187,1055,945],{}," callbacks, and ",[187,1058,976],{}," for the kept decisions.",[179,1061,1063],{"className":181,"code":1062,"language":184,"meta":185,"style":185},"public function alwaysSelect(): array\n{\n    return ['workspace_id', 'archived_at', 'author_id', 'updated_at'];\n}\n",[187,1064,1065,1080,1084,1128],{"__ignoreMap":185},[190,1066,1067,1070,1072,1075,1077],{"class":192,"line":193},[190,1068,1069],{"class":256},"public",[190,1071,317],{"class":256},[190,1073,1074],{"class":320}," alwaysSelect",[190,1076,324],{"class":204},[190,1078,1079],{"class":196}," array\n",[190,1081,1082],{"class":192,"line":224},[190,1083,273],{"class":204},[190,1085,1086,1089,1092,1094,1097,1099,1101,1103,1106,1108,1110,1112,1115,1117,1119,1121,1123,1125],{"class":192,"line":246},[190,1087,1088],{"class":342},"    return",[190,1090,1091],{"class":204}," [",[190,1093,679],{"class":204},[190,1095,1096],{"class":682},"workspace_id",[190,1098,679],{"class":204},[190,1100,688],{"class":204},[190,1102,784],{"class":204},[190,1104,1105],{"class":682},"archived_at",[190,1107,679],{"class":204},[190,1109,688],{"class":204},[190,1111,784],{"class":204},[190,1113,1114],{"class":682},"author_id",[190,1116,679],{"class":204},[190,1118,688],{"class":204},[190,1120,784],{"class":204},[190,1122,976],{"class":682},[190,1124,679],{"class":204},[190,1126,1127],{"class":204},"];\n",[190,1129,1130],{"class":192,"line":253},[190,1131,372],{"class":204},[403,1133,1135],{"id":1134},"turning-it-off","Turning it off",[374,1137,1138,1139,1142,1143,1146,1147,1149],{},"List the extension in ",[187,1140,1141],{},"disabled_extensions"," of ",[187,1144,1145],{},"config\u002Frest.php",": rest-api then leaves the rows to ",[187,1148,390],{}," and the decisions to the policies alone.",[179,1151,1153],{"className":181,"code":1152,"filename":1145,"language":184,"meta":185,"style":185},"'disabled_extensions' => [\n    \\Lomkit\\Access\\Integrations\\RestApi\\AccessControlExtension::class,\n],\n",[187,1154,1155,1168,1202],{"__ignoreMap":185},[190,1156,1157,1159,1161,1163,1165],{"class":192,"line":193},[190,1158,679],{"class":204},[190,1160,1141],{"class":682},[190,1162,679],{"class":204},[190,1164,763],{"class":204},[190,1166,1167],{"class":204}," [\n",[190,1169,1170,1173,1176,1178,1181,1183,1185,1187,1190,1192,1195,1197,1199],{"class":192,"line":224},[190,1171,1172],{"class":204},"    \\",[190,1174,1175],{"class":200},"Lomkit",[190,1177,205],{"class":204},[190,1179,1180],{"class":200},"Access",[190,1182,205],{"class":204},[190,1184,104],{"class":200},[190,1186,205],{"class":204},[190,1188,1189],{"class":200},"RestApi",[190,1191,205],{"class":204},[190,1193,1194],{"class":260},"AccessControlExtension",[190,1196,300],{"class":204},[190,1198,257],{"class":196},[190,1200,1201],{"class":204},",\n",[190,1203,1204],{"class":192,"line":246},[190,1205,1206],{"class":204},"],\n",[1208,1209,1210],"warning",{},[374,1211,1212,1213,1215,1216,1218,1219,1221,1222,1224],{},"Without the extension, nothing restricts the rows of a controlled resource but its own ",[187,1214,390],{},". A resource whose ",[187,1217,390],{}," was removed because the extension applied the control reads every row once the extension is disabled. ",[187,1220,899],{}," then reports again every resource without a perimeter: give each of them a ",[187,1223,390],{}," before you disable the extension.",[374,1226,1227,1229],{},[187,1228,1194],{}," is final, so that no subclass can drop the restriction of the rows, the filter of the search engines or the decision context of the kept decisions. To replace the access rules of rest-api, disable it and register an extension of your own: the package then restricts nothing in rest-api, preloads no row check and adds nothing to the key of the kept decisions.",[374,1231,1232,1235,1236,395],{},[187,1233,1234],{},"php artisan about"," shows whether the extension is enabled: see ",[378,1237,128],{"href":1238},"\u002Ftesting-and-tooling\u002Fcache-and-about#the-about-command",[1240,1241,1242],"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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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 .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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"title":185,"searchDepth":193,"depth":224,"links":1244},[1245,1248,1249,1250,1251,1252],{"id":405,"depth":224,"text":406,"children":1246},[1247],{"id":481,"depth":246,"text":482},{"id":834,"depth":224,"text":835},{"id":909,"depth":224,"text":154},{"id":962,"depth":224,"text":146},{"id":1038,"depth":224,"text":1039},{"id":1134,"depth":224,"text":1135},"With laravel-rest-api 3.6+, AccessControlExtension applies your controls to every resource of a controlled model, its text searches and row checks included.","md",[1256],{"label":110,"icon":1257,"to":380,"target":1258},"i-heroicons-book-open","_blank",{},{"title":110,"description":1253},{"loc":111,"lastmod":1262},"2026-11-21T16:10:34+01:00","YC2Pkx1u-cjXrfGX_TSK6XKZjEc85pyGWrXHCLnW7R8",[1265,1267],{"title":100,"path":101,"stem":102,"description":1266,"children":-1},"Keep the access filter when you query the search engine with your own client, or feed your own index with Access::indexKeysOf() and Access::indexReaderKeys().",{"title":120,"path":121,"stem":122,"description":1268,"children":-1},"The InteractsWithAccess assertions prove on your test data that the levels nest, the policy and the queries agree, and the search finds what the SQL lists.",1795277180166]