[{"data":1,"prerenderedAt":470},["ShallowReactive",2],{"navigation-zh":3,"navigation-v1":81,"\u002Fzh\u002Fguide":146,"\u002Fzh\u002Fguide-surround":317,"\u002Fzh\u002Fguide-og":320},[4,55,77],{"title":5,"path":6,"stem":7,"children":8,"page":-1},"指南","\u002Fzh\u002Fguide","zh\u002F1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39,43,47,51],{"title":10,"path":6,"stem":7},"介绍",{"title":12,"path":13,"stem":14},"序言","\u002Fzh\u002Fguide\u002Fprologue","zh\u002F1.guide\u002F00.prologue",{"title":16,"path":17,"stem":18},"快速上手","\u002Fzh\u002Fguide\u002Fgetting-started","zh\u002F1.guide\u002F02.getting-started",{"title":20,"path":21,"stem":22},"模型","\u002Fzh\u002Fguide\u002Fmodels","zh\u002F1.guide\u002F03.models",{"title":24,"path":25,"stem":26},"关联","\u002Fzh\u002Fguide\u002Frelationships","zh\u002F1.guide\u002F04.relationships",{"title":28,"path":29,"stem":30},"钩子","\u002Fzh\u002Fguide\u002Fhooks","zh\u002F1.guide\u002F05.hooks",{"title":32,"path":33,"stem":34},"搜索","\u002Fzh\u002Fguide\u002Fsearch","zh\u002F1.guide\u002F06.search",{"title":36,"path":37,"stem":38},"批量操作","\u002Fzh\u002Fguide\u002Fbatch-operations","zh\u002F1.guide\u002F07.batch-operations",{"title":40,"path":41,"stem":42},"查询参数","\u002Fzh\u002Fguide\u002Fquery-parameters","zh\u002F1.guide\u002F08.query-parameters",{"title":44,"path":45,"stem":46},"安全","\u002Fzh\u002Fguide\u002Fsecurity","zh\u002F1.guide\u002F09.security",{"title":48,"path":49,"stem":50},"响应","\u002Fzh\u002Fguide\u002Fresponses","zh\u002F1.guide\u002F10.responses",{"title":52,"path":53,"stem":54},"规范","\u002Fzh\u002Fguide\u002Fspecifications","zh\u002F1.guide\u002F11.specifications",{"title":56,"path":57,"stem":58,"children":59},"TypeScript SDK","\u002Fzh\u002Ftypescript-sdk","zh\u002F2.typescript-sdk\u002F01.index",[60,61,64,68,71,74],{"title":10,"path":57,"stem":58},{"title":16,"path":62,"stem":63},"\u002Fzh\u002Ftypescript-sdk\u002Fgetting-started","zh\u002F2.typescript-sdk\u002F02.getting-started",{"title":65,"path":66,"stem":67},"配置","\u002Fzh\u002Ftypescript-sdk\u002Fconfiguration","zh\u002F2.typescript-sdk\u002F03.configuration",{"title":20,"path":69,"stem":70},"\u002Fzh\u002Ftypescript-sdk\u002Fmodels","zh\u002F2.typescript-sdk\u002F04.models",{"title":24,"path":72,"stem":73},"\u002Fzh\u002Ftypescript-sdk\u002Frelationships","zh\u002F2.typescript-sdk\u002F05.relationships",{"title":40,"path":75,"stem":76},"\u002Fzh\u002Ftypescript-sdk\u002Fquery-parameters","zh\u002F2.typescript-sdk\u002F06.query-parameters",{"title":78,"path":79,"stem":80},"视频教程","\u002Fzh\u002Fscreencasts","zh\u002Fscreencasts",[82,125],{"title":83,"path":84,"stem":85,"children":86},"Guide","\u002Fv1.x\u002Fguide","v1.x\u002F1.guide\u002F01.index",[87,89,93,97,101,105,109,113,117,121],{"title":88,"path":84,"stem":85},"Introduction",{"title":90,"path":91,"stem":92},"Getting Started","\u002Fv1.x\u002Fguide\u002Fgetting-started","v1.x\u002F1.guide\u002F02.getting-started",{"title":94,"path":95,"stem":96},"Models","\u002Fv1.x\u002Fguide\u002Fmodels","v1.x\u002F1.guide\u002F03.models",{"title":98,"path":99,"stem":100},"Relationships","\u002Fv1.x\u002Fguide\u002Frelationships","v1.x\u002F1.guide\u002F04.relationships",{"title":102,"path":103,"stem":104},"Hooks","\u002Fv1.x\u002Fguide\u002Fhooks","v1.x\u002F1.guide\u002F05.hooks",{"title":106,"path":107,"stem":108},"Search","\u002Fv1.x\u002Fguide\u002Fsearch","v1.x\u002F1.guide\u002F06.search",{"title":110,"path":111,"stem":112},"Batch Operations","\u002Fv1.x\u002Fguide\u002Fbatch-operations","v1.x\u002F1.guide\u002F07.batch-operations",{"title":114,"path":115,"stem":116},"Query Parameters","\u002Fv1.x\u002Fguide\u002Fquery-parameters","v1.x\u002F1.guide\u002F08.query-parameters",{"title":118,"path":119,"stem":120},"Security","\u002Fv1.x\u002Fguide\u002Fsecurity","v1.x\u002F1.guide\u002F09.security",{"title":122,"path":123,"stem":124},"Responses","\u002Fv1.x\u002Fguide\u002Fresponses","v1.x\u002F1.guide\u002F10.responses",{"title":56,"path":126,"stem":127,"children":128},"\u002Fv1.x\u002Ftypescript-sdk","v1.x\u002F2.typescript-sdk\u002F01.index",[129,130,133,137,140,143],{"title":88,"path":126,"stem":127},{"title":90,"path":131,"stem":132},"\u002Fv1.x\u002Ftypescript-sdk\u002Fgetting-started","v1.x\u002F2.typescript-sdk\u002F02.getting-started",{"title":134,"path":135,"stem":136},"Configuration","\u002Fv1.x\u002Ftypescript-sdk\u002Fconfiguration","v1.x\u002F2.typescript-sdk\u002F03.configuration",{"title":94,"path":138,"stem":139},"\u002Fv1.x\u002Ftypescript-sdk\u002Fmodels","v1.x\u002F2.typescript-sdk\u002F04.models",{"title":98,"path":141,"stem":142},"\u002Fv1.x\u002Ftypescript-sdk\u002Frelationships","v1.x\u002F2.typescript-sdk\u002F05.relationships",{"title":114,"path":144,"stem":145},"\u002Fv1.x\u002Ftypescript-sdk\u002Fquery-parameters","v1.x\u002F2.typescript-sdk\u002F06.query-parameters",{"id":147,"title":10,"body":148,"description":310,"extension":311,"links":312,"meta":313,"navigation":314,"path":6,"seo":315,"stem":7,"__hash__":316},"docs_zh\u002Fzh\u002F1.guide\u002F01.index.md",{"type":149,"value":150,"toc":303},"minimark",[151,155,159,199,225,231,234],[152,153,154],"h2",{"id":154},"工作原理",[156,157,158],"p",{},"Orion 充分利用了 Laravel 最强大的特性：Eloquent 模型与关联、策略、请求类以及 API 资源，这使得它功能强大、易于扩展，同时上手非常简单。",[156,160,161,162,166,167,166,170,166,173,166,176,166,179,166,182,185,186,166,189,166,192,166,195,198],{},"你只需创建一个控制器，将它与想要通过 API 管理的 Eloquent 模型关联起来，剩下的 REST 工作就交给 Orion！",[163,164,165],"code",{},"index","、",[163,168,169],{},"search",[163,171,172],{},"show",[163,174,175],{},"store",[163,177,178],{},"update",[163,180,181],{},"destroy",[163,183,184],{},"restore"," 以及 ",[163,187,188],{},"batchStore",[163,190,191],{},"batchUpdate",[163,193,194],{},"batchDestroy",[163,196,197],{},"batchRestore"," 操作的所有端点都会自动就绪，并带有完善的授权、验证和错误处理（当然，策略和请求类需要你自己定义）。",[156,200,201,202,205,206,166,209,205,212,166,215,166,218,166,221,224],{},"但这还不是全部。定义关联控制器后，你的 API 使用者就可以管理所有类型的关联。是的，所有类型——这意味着 ",[163,203,204],{},"associate","\u002F",[163,207,208],{},"dissociate",[163,210,211],{},"attach",[163,213,214],{},"detach",[163,216,217],{},"sync",[163,219,220],{},"toggle",[163,222,223],{},"updatePivot"," 以及 CRUD 操作都可以通过标准化的 REST API 使用。",[156,226,227,228,230],{},"此外，作为额外福利，模型控制器和关联控制器上的 ",[163,229,169],{}," 端点允许应用各种查询约束来获取过滤后的结果。",[152,232,233],{"id":233},"功能特性",[235,236,237,248,263,268,273,285,297],"ul",{},[238,239,240,241,244,245,247],"li",{},"为",[242,243,20],"a",{"href":21},"和",[242,246,24],{"href":25},"提供 REST API，并支持批量操作",[238,249,250,251,166,255,244,259],{},"高级搜索能力，支持",[242,252,254],{"href":253},"\u002Fzh\u002Fguide\u002Fsearch#%E6%8E%92%E5%BA%8F","排序",[242,256,258],{"href":257},"\u002Fzh\u002Fguide\u002Fsearch#%E8%BF%87%E6%BB%A4","过滤",[242,260,262],{"href":261},"\u002Fzh\u002Fguide\u002Fsearch#%E5%85%B3%E9%94%AE%E8%AF%8D%E6%90%9C%E7%B4%A2","关键词搜索",[238,264,265,266],{},"自动生成 OpenAPI ",[242,267,52],{"href":53},[238,269,270,271],{},"全面的端点",[242,272,28],{"href":29},[238,274,275,276,280,281],{},"通过查询参数",[242,277,279],{"href":278},"\u002Fzh\u002Fguide\u002Fquery-parameters#%E5%8C%85%E5%90%AB%E5%85%B3%E8%81%94","包含关联","和使用",[242,282,284],{"href":283},"\u002Fzh\u002Fguide\u002Fquery-parameters#%E8%BD%AF%E5%88%A0%E9%99%A4","软删除",[238,286,287,288,292,293],{},"简单直接的",[242,289,291],{"href":290},"\u002Fzh\u002Fguide\u002Fsecurity#%E6%8E%88%E6%9D%83","授权","与",[242,294,296],{"href":295},"\u002Fzh\u002Fguide\u002Fsecurity#%E9%AA%8C%E8%AF%81","验证",[238,298,299,300,302],{},"通过 API 资源对",[242,301,48],{"href":49},"进行转换",{"title":304,"searchDepth":305,"depth":306,"links":307},"",1,2,[308,309],{"id":154,"depth":306,"text":154},{"id":233,"depth":306,"text":233},"欢迎阅读 Orion for Laravel 文档。","md",null,{},true,{"title":10,"description":310},"hhNV3G1HZP_mM37hdpr16E-D7TYxMY-ZzmvWab9F0hI",[312,318],{"title":12,"path":13,"stem":14,"description":319,"children":-1},"了解 Orion for Laravel 2.0 中的变更与新特性。",{"id":321,"title":88,"body":322,"description":464,"extension":311,"links":312,"meta":465,"navigation":314,"path":466,"seo":467,"stem":468,"__hash__":469},"docs_en\u002F1.guide\u002F01.index.md",{"type":149,"value":323,"toc":460},[324,328,331,359,377,383,387],[152,325,327],{"id":326},"how-it-works","How It Works",[156,329,330],{},"Orion uses the most powerful features of Laravel: Eloquent models and relationships, policies, request classes, and API resources, which makes it incredibly powerful and extensible, yet simple to get started with.",[156,332,333,334,336,337,336,339,336,341,336,343,336,345,336,347,349,350,336,352,336,354,336,356,358],{},"You create a controller, associate it with an Eloquent model you would like to manage via the API and let Orion do the REST (see what I've done here 😄 ) for you! All endpoints for ",[163,335,165],{},", ",[163,338,169],{},[163,340,172],{},[163,342,175],{},[163,344,178],{},[163,346,181],{},[163,348,184],{}," and ",[163,351,188],{},[163,353,191],{},[163,355,194],{},[163,357,197],{}," operations will already be there with proper authorization, validation and error handling (you need to define policies and request classes yourself, of course).",[156,360,361,362,205,364,336,366,205,368,336,370,336,372,336,374,376],{},"But it does not end here. Define relationship controllers, and it will allow your API consumers to manage all types of relations. Yes, all, which means ",[163,363,204],{},[163,365,208],{},[163,367,211],{},[163,369,214],{},[163,371,217],{},[163,373,220],{},[163,375,223],{}," as well as CRUD operations are available via a standardized REST API.",[156,378,379,380,382],{},"And, as a bonus, the ",[163,381,169],{}," endpoint on both model and relationship controllers allows applying all sorts of query constraints to retrieve filtered results.",[152,384,386],{"id":385},"features","Features",[235,388,389,401,417,425,432,443,454],{},[238,390,391,392,349,396,400],{},"REST API for ",[242,393,395],{"href":394},"\u002Fguide\u002Fmodels","models",[242,397,399],{"href":398},"\u002Fguide\u002Frelationships","relationships"," with batch operations support",[238,402,403,404,336,408,412,413],{},"Advanced searching capabilities with ",[242,405,407],{"href":406},"\u002Fguide\u002Fsearch#sorting","sorting",[242,409,411],{"href":410},"\u002Fguide\u002Fsearch#filtering","filtering",", and ",[242,414,416],{"href":415},"\u002Fguide\u002Fsearch#keyword-search","keyword search",[238,418,419,420,424],{},"Automatic OpenAPI ",[242,421,423],{"href":422},"\u002Fguide\u002Fspecifications","specifications"," generation",[238,426,427,428],{},"Comprehensive set of endpoint ",[242,429,431],{"href":430},"\u002Fguide\u002Fhooks","hooks",[238,433,434,349,438,442],{},[242,435,437],{"href":436},"\u002Fguide\u002Fquery-parameters#including-relations","Relations inclusion",[242,439,441],{"href":440},"\u002Fguide\u002Fquery-parameters#soft-deletes","soft deletes"," via query parameters",[238,444,445,446,349,450],{},"Straightforward ",[242,447,449],{"href":448},"\u002Fguide\u002Fsecurity#authorization","authorization",[242,451,453],{"href":452},"\u002Fguide\u002Fsecurity#validation","validation",[238,455,456,459],{},[242,457,122],{"href":458},"\u002Fguide\u002Fresponses"," transformation via API resources",{"title":304,"searchDepth":305,"depth":306,"links":461},[462,463],{"id":326,"depth":306,"text":327},{"id":385,"depth":306,"text":386},"Welcome to Orion for Laravel documentation.",{},"\u002Fguide",{"title":88,"description":464},"1.guide\u002F01.index","rZQQYNq4V63jg9XuaTQORUeb2PQsg7YS9UoXBc-E4Io",1784394462747]