[{"data":1,"prerenderedAt":1365},["ShallowReactive",2],{"navigation":3,"\u002Fconcepts\u002Fservice-providers":193,"\u002Fconcepts\u002Fservice-providers-surround":1360},[4,27,49,99,149,169,183],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Getting Started","i-lucide-rocket","\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},"Existing Application","\u002Fgetting-started\u002Fexisting-application","1.getting-started\u002F4.existing-application",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Concepts","i-lucide-layers","\u002Fconcepts","2.concepts",[33,37,41,45],{"title":34,"path":35,"stem":36},"Layers","\u002Fconcepts\u002Flayers","2.concepts\u002F1.layers",{"title":38,"path":39,"stem":40},"Buckets","\u002Fconcepts\u002Fbuckets","2.concepts\u002F2.buckets",{"title":42,"path":43,"stem":44},"Boundaries","\u002Fconcepts\u002Fboundaries","2.concepts\u002F3.boundaries",{"title":46,"path":47,"stem":48},"Service Providers","\u002Fconcepts\u002Fservice-providers","2.concepts\u002F4.service-providers",{"title":50,"icon":51,"path":52,"stem":53,"children":54,"page":26},"Guides","i-lucide-book-marked","\u002Fguides","3.guides",[55,59,63,67,71,75,79,83,87,91,95],{"title":56,"path":57,"stem":58},"Add a Domain","\u002Fguides\u002Fadd-a-domain","3.guides\u002F01.add-a-domain",{"title":60,"path":61,"stem":62},"Share Code Between Layers","\u002Fguides\u002Fshare-code-between-layers","3.guides\u002F02.share-code-between-layers",{"title":64,"path":65,"stem":66},"Routes","\u002Fguides\u002Froutes","3.guides\u002F03.routes",{"title":68,"path":69,"stem":70},"Views and Components","\u002Fguides\u002Fviews-and-components","3.guides\u002F04.views-and-components",{"title":72,"path":73,"stem":74},"Seeders","\u002Fguides\u002Fseeders","3.guides\u002F05.seeders",{"title":76,"path":77,"stem":78},"Configuration","\u002Fguides\u002Fconfiguration","3.guides\u002F06.configuration",{"title":80,"path":81,"stem":82},"Events","\u002Fguides\u002Fevents","3.guides\u002F07.events",{"title":84,"path":85,"stem":86},"Tests and CI","\u002Fguides\u002Ftesting-and-ci","3.guides\u002F08.testing-and-ci",{"title":88,"path":89,"stem":90},"Production","\u002Fguides\u002Fproduction","3.guides\u002F09.production",{"title":92,"path":93,"stem":94},"Remove a Layer","\u002Fguides\u002Fremoving-a-layer","3.guides\u002F10.removing-a-layer",{"title":96,"path":97,"stem":98},"Multi-tenancy","\u002Fguides\u002Fmulti-tenancy","3.guides\u002F11.multi-tenancy",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":26},"Commands","i-lucide-terminal","\u002Fcommands","4.commands",[105,109,113,117,121,125,129,133,137,141,145],{"title":106,"path":107,"stem":108},"Overview","\u002Fcommands\u002Foverview","4.commands\u002F01.overview",{"title":110,"path":111,"stem":112},"osdd:start","\u002Fcommands\u002Fosdd-start","4.commands\u002F02.osdd-start",{"title":114,"path":115,"stem":116},"osdd:layer","\u002Fcommands\u002Fosdd-layer","4.commands\u002F03.osdd-layer",{"title":118,"path":119,"stem":120},"osdd:list","\u002Fcommands\u002Fosdd-list","4.commands\u002F04.osdd-list",{"title":122,"path":123,"stem":124},"osdd:check","\u002Fcommands\u002Fosdd-check","4.commands\u002F05.osdd-check",{"title":126,"path":127,"stem":128},"osdd:graph","\u002Fcommands\u002Fosdd-graph","4.commands\u002F06.osdd-graph",{"title":130,"path":131,"stem":132},"osdd:seed","\u002Fcommands\u002Fosdd-seed","4.commands\u002F07.osdd-seed",{"title":134,"path":135,"stem":136},"osdd:phpunit","\u002Fcommands\u002Fosdd-phpunit","4.commands\u002F08.osdd-phpunit",{"title":138,"path":139,"stem":140},"osdd:remove","\u002Fcommands\u002Fosdd-remove","4.commands\u002F09.osdd-remove",{"title":142,"path":143,"stem":144},"osdd:cache","\u002Fcommands\u002Fosdd-cache","4.commands\u002F10.osdd-cache",{"title":146,"path":147,"stem":148},"Generators","\u002Fcommands\u002Fmake-commands","4.commands\u002F11.make-commands",{"title":150,"icon":151,"path":152,"stem":153,"children":154,"page":26},"API Reference","i-lucide-book-open","\u002Fapi-reference","5.api-reference",[155,159,162,166],{"title":156,"path":157,"stem":158},"LayerServiceProvider","\u002Fapi-reference\u002Flayer-service-provider","5.api-reference\u002F1.layer-service-provider",{"title":34,"path":160,"stem":161},"\u002Fapi-reference\u002Flayers","5.api-reference\u002F2.layers",{"title":163,"path":164,"stem":165},"SeederRegistry","\u002Fapi-reference\u002Fseeder-registry","5.api-reference\u002F3.seeder-registry",{"title":76,"path":167,"stem":168},"\u002Fapi-reference\u002Fconfiguration","5.api-reference\u002F4.configuration",{"title":170,"icon":171,"path":172,"stem":173,"children":174,"page":26},"Integrations","i-lucide-puzzle","\u002Fintegrations","6.integrations",[175,179],{"title":176,"path":177,"stem":178},"Laravel Boost","\u002Fintegrations\u002Flaravel-boost","6.integrations\u002F1.laravel-boost",{"title":180,"path":181,"stem":182},"Tinker and IDE Helper","\u002Fintegrations\u002Ftinker-and-ide-helper","6.integrations\u002F2.tinker-and-ide-helper",{"title":184,"icon":185,"path":186,"stem":187,"children":188,"page":26},"Upgrade","i-lucide-arrow-up-circle","\u002Fupgrade","7.upgrade",[189],{"title":190,"path":191,"stem":192},"Upgrade from 2.x","\u002Fupgrade\u002Ffrom-2x","7.upgrade\u002F1.from-2x",{"id":194,"title":46,"body":195,"description":1353,"extension":1354,"links":1355,"meta":1356,"navigation":360,"path":47,"seo":1357,"sitemap":1358,"stem":48,"__hash__":1359},"docs\u002F2.concepts\u002F4.service-providers.md",{"type":196,"value":197,"toc":1346},"minimark",[198,211,305,323,332,728,746,751,758,848,863,867,870,975,981,985,994,1032,1042,1129,1133,1136,1241,1263,1272,1276,1279,1342],[199,200,201,202,206,207,210],"p",{},"Every layer has a service provider: it is where the layer plugs itself into the application. The provider extends ",[203,204,205],"code",{},"Lomkit\\Osdd\\LayerServiceProvider"," instead of Laravel's ",[203,208,209],{},"ServiceProvider",", which adds these methods:",[212,213,214,230],"table",{},[215,216,217],"thead",{},[218,219,220,224,227],"tr",{},[221,222,223],"th",{},"Method",[221,225,226],{},"Use",[221,228,229],{},"Guide",[231,232,233,255,269,283],"tbody",{},[218,234,235,241,250],{},[236,237,238],"td",{},[203,239,240],{},"loadSeeders()",[236,242,243,244,246,247],{},"Register the layer's seeders for ",[203,245,130],{}," and ",[203,248,249],{},"LayersSeeder",[236,251,252],{},[253,254,72],"a",{"href":73},[218,256,257,262,265],{},[236,258,259],{},[203,260,261],{},"overrideConfigFrom()",[236,263,264],{},"Override the config of any package with a layer file",[236,266,267],{},[253,268,76],{"href":77},[218,270,271,276,279],{},[236,272,273],{},[203,274,275],{},"withRouting()",[236,277,278],{},"Mount the layer's route files",[236,280,281],{},[253,282,64],{"href":65},[218,284,285,297,300],{},[236,286,287,290,291,290,294],{},[203,288,289],{},"withViews()",", ",[203,292,293],{},"withTranslations()",[203,295,296],{},"withComponents()",[236,298,299],{},"Register views, translations and Blade components under the layer name",[236,301,302],{},[253,303,304],{"href":69},"Views and components",[199,306,307,308,311,312,290,315,318,319,322],{},"Laravel's own methods work as usual: ",[203,309,310],{},"loadMigrationsFrom()"," adds the layer's migrations to ",[203,313,314],{},"php artisan migrate",[203,316,317],{},"commands()"," registers its Artisan commands. Every signature is in the ",[253,320,321],{"href":157},"API reference",".",[199,324,325,327,328,331],{},[203,326,114],{}," generates this provider with the ",[203,329,330],{},"provider"," generator:",[333,334,340],"pre",{"className":335,"code":336,"filename":337,"language":338,"meta":339,"style":339},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003C?php\n\nnamespace Functional\\Orders\\Providers;\n\nuse Lomkit\\Osdd\\LayerServiceProvider;\n\nclass OrdersServiceProvider extends LayerServiceProvider\n{\n    public function boot(): void\n    {\n        if ($this->app->runningInConsole()) {\n            $this->loadMigrationsFrom(__DIR__ . '\u002F..\u002F..\u002Fdatabase\u002Fmigrations');\n        }\n\n        $this->withRouting(\n            web: __DIR__ . '\u002F..\u002F..\u002Froutes\u002Fweb.php',\n            api: __DIR__ . '\u002F..\u002F..\u002Froutes\u002Fapi.php',\n            commands: __DIR__ . '\u002F..\u002F..\u002Froutes\u002Fconsole.php',\n            channels: __DIR__ . '\u002F..\u002F..\u002Froutes\u002Fchannels.php',\n        );\n\n        $this->withViews(__DIR__ . '\u002F..\u002F..\u002Fresources\u002Fviews');\n        $this->withTranslations(__DIR__ . '\u002F..\u002F..\u002Flang');\n    }\n\n    public function register(): void\n    {\n        \u002F\u002F\n    }\n}\n","functional\u002Forders\u002Fsrc\u002FProviders\u002FOrdersServiceProvider.php","php","",[203,341,342,355,362,387,392,412,417,433,439,458,464,489,517,523,528,540,564,585,606,627,633,638,659,680,686,691,705,710,717,722],{"__ignoreMap":339},[343,344,347,351],"span",{"class":345,"line":346},"line",1,[343,348,350],{"class":349},"sMK4o","\u003C?",[343,352,354],{"class":353},"sTEyZ","php\n",[343,356,358],{"class":345,"line":357},2,[343,359,361],{"emptyLinePlaceholder":360},true,"\n",[343,363,365,369,373,376,379,381,384],{"class":345,"line":364},3,[343,366,368],{"class":367},"sbssI","namespace",[343,370,372],{"class":371},"sBMFI"," Functional",[343,374,375],{"class":349},"\\",[343,377,378],{"class":371},"Orders",[343,380,375],{"class":349},[343,382,383],{"class":371},"Providers",[343,385,386],{"class":349},";\n",[343,388,390],{"class":345,"line":389},4,[343,391,361],{"emptyLinePlaceholder":360},[343,393,395,398,401,403,406,408,410],{"class":345,"line":394},5,[343,396,397],{"class":367},"use",[343,399,400],{"class":353}," Lomkit",[343,402,375],{"class":349},[343,404,405],{"class":353},"Osdd",[343,407,375],{"class":349},[343,409,156],{"class":353},[343,411,386],{"class":349},[343,413,415],{"class":345,"line":414},6,[343,416,361],{"emptyLinePlaceholder":360},[343,418,420,424,427,430],{"class":345,"line":419},7,[343,421,423],{"class":422},"spNyl","class",[343,425,426],{"class":371}," OrdersServiceProvider",[343,428,429],{"class":422}," extends",[343,431,432],{"class":371}," LayerServiceProvider\n",[343,434,436],{"class":345,"line":435},8,[343,437,438],{"class":349},"{\n",[343,440,442,445,448,452,455],{"class":345,"line":441},9,[343,443,444],{"class":422},"    public",[343,446,447],{"class":422}," function",[343,449,451],{"class":450},"s2Zo4"," boot",[343,453,454],{"class":349},"():",[343,456,457],{"class":367}," void\n",[343,459,461],{"class":345,"line":460},10,[343,462,463],{"class":349},"    {\n",[343,465,467,471,474,477,480,483,486],{"class":345,"line":466},11,[343,468,470],{"class":469},"s7zQu","        if",[343,472,473],{"class":349}," ($this->",[343,475,476],{"class":353},"app",[343,478,479],{"class":349},"->",[343,481,482],{"class":450},"runningInConsole",[343,484,485],{"class":349},"())",[343,487,488],{"class":349}," {\n",[343,490,492,495,498,501,504,507,511,514],{"class":345,"line":491},12,[343,493,494],{"class":349},"            $this->",[343,496,497],{"class":450},"loadMigrationsFrom",[343,499,500],{"class":349},"(__DIR__",[343,502,503],{"class":349}," .",[343,505,506],{"class":349}," '",[343,508,510],{"class":509},"sfazB","\u002F..\u002F..\u002Fdatabase\u002Fmigrations",[343,512,513],{"class":349},"'",[343,515,516],{"class":349},");\n",[343,518,520],{"class":345,"line":519},13,[343,521,522],{"class":349},"        }\n",[343,524,526],{"class":345,"line":525},14,[343,527,361],{"emptyLinePlaceholder":360},[343,529,531,534,537],{"class":345,"line":530},15,[343,532,533],{"class":349},"        $this->",[343,535,536],{"class":450},"withRouting",[343,538,539],{"class":349},"(\n",[343,541,543,546,549,552,554,556,559,561],{"class":345,"line":542},16,[343,544,545],{"class":371},"            web",[343,547,548],{"class":349},":",[343,550,551],{"class":349}," __DIR__",[343,553,503],{"class":349},[343,555,506],{"class":349},[343,557,558],{"class":509},"\u002F..\u002F..\u002Froutes\u002Fweb.php",[343,560,513],{"class":349},[343,562,563],{"class":349},",\n",[343,565,567,570,572,574,576,578,581,583],{"class":345,"line":566},17,[343,568,569],{"class":371},"            api",[343,571,548],{"class":349},[343,573,551],{"class":349},[343,575,503],{"class":349},[343,577,506],{"class":349},[343,579,580],{"class":509},"\u002F..\u002F..\u002Froutes\u002Fapi.php",[343,582,513],{"class":349},[343,584,563],{"class":349},[343,586,588,591,593,595,597,599,602,604],{"class":345,"line":587},18,[343,589,590],{"class":371},"            commands",[343,592,548],{"class":349},[343,594,551],{"class":349},[343,596,503],{"class":349},[343,598,506],{"class":349},[343,600,601],{"class":509},"\u002F..\u002F..\u002Froutes\u002Fconsole.php",[343,603,513],{"class":349},[343,605,563],{"class":349},[343,607,609,612,614,616,618,620,623,625],{"class":345,"line":608},19,[343,610,611],{"class":371},"            channels",[343,613,548],{"class":349},[343,615,551],{"class":349},[343,617,503],{"class":349},[343,619,506],{"class":349},[343,621,622],{"class":509},"\u002F..\u002F..\u002Froutes\u002Fchannels.php",[343,624,513],{"class":349},[343,626,563],{"class":349},[343,628,630],{"class":345,"line":629},20,[343,631,632],{"class":349},"        );\n",[343,634,636],{"class":345,"line":635},21,[343,637,361],{"emptyLinePlaceholder":360},[343,639,641,643,646,648,650,652,655,657],{"class":345,"line":640},22,[343,642,533],{"class":349},[343,644,645],{"class":450},"withViews",[343,647,500],{"class":349},[343,649,503],{"class":349},[343,651,506],{"class":349},[343,653,654],{"class":509},"\u002F..\u002F..\u002Fresources\u002Fviews",[343,656,513],{"class":349},[343,658,516],{"class":349},[343,660,662,664,667,669,671,673,676,678],{"class":345,"line":661},23,[343,663,533],{"class":349},[343,665,666],{"class":450},"withTranslations",[343,668,500],{"class":349},[343,670,503],{"class":349},[343,672,506],{"class":349},[343,674,675],{"class":509},"\u002F..\u002F..\u002Flang",[343,677,513],{"class":349},[343,679,516],{"class":349},[343,681,683],{"class":345,"line":682},24,[343,684,685],{"class":349},"    }\n",[343,687,689],{"class":345,"line":688},25,[343,690,361],{"emptyLinePlaceholder":360},[343,692,694,696,698,701,703],{"class":345,"line":693},26,[343,695,444],{"class":422},[343,697,447],{"class":422},[343,699,700],{"class":450}," register",[343,702,454],{"class":349},[343,704,457],{"class":367},[343,706,708],{"class":345,"line":707},27,[343,709,463],{"class":349},[343,711,713],{"class":345,"line":712},28,[343,714,716],{"class":715},"sHwdD","        \u002F\u002F\n",[343,718,720],{"class":345,"line":719},29,[343,721,685],{"class":349},[343,723,725],{"class":345,"line":724},30,[343,726,727],{"class":349},"}\n",[199,729,730,731,734,735,738,739,742,743,745],{},"Missing route files, views and ",[203,732,733],{},"lang"," folders are skipped, so every call is safe in a fresh layer. The generated provider registers no seeder: the ",[203,736,737],{},"seeder"," generator, or ",[203,740,741],{},"osdd:seeder",", adds the ",[203,744,240],{}," call.",[747,748,750],"h2",{"id":749},"registering-the-provider","Registering the provider",[199,752,753,754,757],{},"Laravel boots the provider because the layer's ",[203,755,756],{},"composer.json"," lists it:",[333,759,764],{"className":760,"code":761,"filename":762,"language":763,"meta":339,"style":339},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\"extra\": {\n    \"laravel\": {\n        \"providers\": [\n            \"Functional\\\\Orders\\\\Providers\\\\OrdersServiceProvider\"\n        ]\n    }\n}\n","functional\u002Forders\u002Fcomposer.json","json",[203,765,766,781,795,810,835,840,844],{"__ignoreMap":339},[343,767,768,771,774,776,779],{"class":345,"line":346},[343,769,770],{"class":349},"\"",[343,772,773],{"class":509},"extra",[343,775,770],{"class":349},[343,777,778],{"class":353},": ",[343,780,438],{"class":349},[343,782,783,786,789,791,793],{"class":345,"line":357},[343,784,785],{"class":349},"    \"",[343,787,788],{"class":422},"laravel",[343,790,770],{"class":349},[343,792,548],{"class":349},[343,794,488],{"class":349},[343,796,797,800,803,805,807],{"class":345,"line":364},[343,798,799],{"class":349},"        \"",[343,801,802],{"class":371},"providers",[343,804,770],{"class":349},[343,806,548],{"class":349},[343,808,809],{"class":349}," [\n",[343,811,812,815,818,821,823,825,827,829,832],{"class":345,"line":389},[343,813,814],{"class":349},"            \"",[343,816,817],{"class":509},"Functional",[343,819,820],{"class":353},"\\\\",[343,822,378],{"class":509},[343,824,820],{"class":353},[343,826,383],{"class":509},[343,828,820],{"class":353},[343,830,831],{"class":509},"OrdersServiceProvider",[343,833,834],{"class":349},"\"\n",[343,836,837],{"class":345,"line":394},[343,838,839],{"class":349},"        ]\n",[343,841,842],{"class":345,"line":414},[343,843,685],{"class":349},[343,845,846],{"class":345,"line":419},[343,847,727],{"class":349},[199,849,850,246,852,855,856,859,860,322],{},[203,851,114],{},[203,853,854],{},"osdd:provider"," add this entry for you. Run ",[203,857,858],{},"composer update functional\u002Forders"," once after adding a provider so Laravel rebuilds its package manifest. Do not list layer providers in ",[203,861,862],{},"bootstrap\u002Fproviders.php",[747,864,866],{"id":865},"generators-keep-it-in-sync","Generators keep it in sync",[199,868,869],{},"Several generators add the line their file needs to the layer provider, so the new file is loaded without editing anything:",[212,871,872,882],{},[215,873,874],{},[218,875,876,879],{},[221,877,878],{},"Command",[221,880,881],{},"Adds to the provider",[231,883,884,903,916,931,945,959],{},[218,885,886,894],{},[236,887,888,290,891],{},[203,889,890],{},"osdd:migration",[203,892,893],{},"osdd:*-table",[236,895,896,899,900],{},[203,897,898],{},"$this->loadMigrationsFrom(...)"," in ",[203,901,902],{},"boot()",[218,904,905,909],{},[236,906,907],{},[203,908,741],{},[236,910,911,899,914],{},[203,912,913],{},"$this->loadSeeders([...])",[203,915,902],{},[218,917,918,923],{},[236,919,920],{},[203,921,922],{},"osdd:config",[236,924,925,899,928],{},[203,926,927],{},"$this->overrideConfigFrom(...)",[203,929,930],{},"register()",[218,932,933,938],{},[236,934,935],{},[203,936,937],{},"osdd:command",[236,939,940,899,943],{},[203,941,942],{},"$this->commands([...])",[203,944,902],{},[218,946,947,952],{},[236,948,949],{},[203,950,951],{},"osdd:view",[236,953,954,899,957],{},[203,955,956],{},"$this->withViews(...)",[203,958,902],{},[218,960,961,966],{},[236,962,963],{},[203,964,965],{},"osdd:component",[236,967,968,246,970,899,973],{},[203,969,956],{},[203,971,972],{},"$this->withComponents(...)",[203,974,902],{},[199,976,977,978,322],{},"A call the provider already makes is never added twice, whatever its layout. When the layer has no provider, or the method is missing, the generator prints the line to add by hand. See ",[253,979,146],{"href":980},"\u002Fcommands\u002Fmake-commands#generators-that-wire-the-provider",[747,982,984],{"id":983},"policies","Policies",[199,986,987,988,990,991,548],{},"Laravel discovers a policy that sits in the ",[203,989,984],{}," namespace of its model's layer, the same way it does for ",[203,992,993],{},"app\u002F",[212,995,996,1006],{},[215,997,998],{},[218,999,1000,1003],{},[221,1001,1002],{},"Model",[221,1004,1005],{},"Policy found",[231,1007,1008,1020],{},[218,1009,1010,1015],{},[236,1011,1012],{},[203,1013,1014],{},"Functional\\Orders\\Models\\Order",[236,1016,1017],{},[203,1018,1019],{},"Functional\\Orders\\Policies\\OrderPolicy",[218,1021,1022,1027],{},[236,1023,1024],{},[203,1025,1026],{},"Functional\\Users\\Models\\User",[236,1028,1029],{},[203,1030,1031],{},"Functional\\Users\\Policies\\UserPolicy",[199,1033,1034,1037,1038,1041],{},[203,1035,1036],{},"osdd:policy OrderPolicy --model=Order --layer=functional\u002Forders"," creates the policy in that namespace, so there is nothing to register. Call ",[203,1039,1040],{},"Gate::policy()"," only for a policy whose name or namespace does not follow the convention:",[333,1043,1045],{"className":335,"code":1044,"language":338,"meta":339,"style":339},"use Illuminate\\Support\\Facades\\Gate;\n\npublic function boot(): void\n{\n    Gate::policy(Order::class, OrderAccessPolicy::class);\n}\n",[203,1046,1047,1071,1075,1088,1092,1125],{"__ignoreMap":339},[343,1048,1049,1051,1054,1056,1059,1061,1064,1066,1069],{"class":345,"line":346},[343,1050,397],{"class":367},[343,1052,1053],{"class":353}," Illuminate",[343,1055,375],{"class":349},[343,1057,1058],{"class":353},"Support",[343,1060,375],{"class":349},[343,1062,1063],{"class":353},"Facades",[343,1065,375],{"class":349},[343,1067,1068],{"class":353},"Gate",[343,1070,386],{"class":349},[343,1072,1073],{"class":345,"line":357},[343,1074,361],{"emptyLinePlaceholder":360},[343,1076,1077,1080,1082,1084,1086],{"class":345,"line":364},[343,1078,1079],{"class":422},"public",[343,1081,447],{"class":422},[343,1083,451],{"class":450},[343,1085,454],{"class":349},[343,1087,457],{"class":367},[343,1089,1090],{"class":345,"line":389},[343,1091,438],{"class":349},[343,1093,1094,1097,1100,1103,1106,1109,1111,1113,1116,1119,1121,1123],{"class":345,"line":394},[343,1095,1096],{"class":371},"    Gate",[343,1098,1099],{"class":349},"::",[343,1101,1102],{"class":450},"policy",[343,1104,1105],{"class":349},"(",[343,1107,1108],{"class":371},"Order",[343,1110,1099],{"class":349},[343,1112,423],{"class":367},[343,1114,1115],{"class":349},",",[343,1117,1118],{"class":371}," OrderAccessPolicy",[343,1120,1099],{"class":349},[343,1122,423],{"class":367},[343,1124,516],{"class":349},[343,1126,1127],{"class":345,"line":414},[343,1128,727],{"class":349},[747,1130,1132],{"id":1131},"commands-observers-and-events","Commands, observers and events",[199,1134,1135],{},"Anything a Laravel service provider does works in a layer provider. Observers are never discovered: register them here.",[333,1137,1139],{"className":335,"code":1138,"language":338,"meta":339,"style":339},"public function boot(): void\n{\n    Order::observe(OrderObserver::class);\n\n    Event::listen(OrderPlaced::class, SendOrderConfirmation::class);\n\n    $this->commands([PruneAbandonedOrders::class]);\n}\n",[203,1140,1141,1153,1157,1178,1182,1212,1216,1237],{"__ignoreMap":339},[343,1142,1143,1145,1147,1149,1151],{"class":345,"line":346},[343,1144,1079],{"class":422},[343,1146,447],{"class":422},[343,1148,451],{"class":450},[343,1150,454],{"class":349},[343,1152,457],{"class":367},[343,1154,1155],{"class":345,"line":357},[343,1156,438],{"class":349},[343,1158,1159,1162,1164,1167,1169,1172,1174,1176],{"class":345,"line":364},[343,1160,1161],{"class":371},"    Order",[343,1163,1099],{"class":349},[343,1165,1166],{"class":450},"observe",[343,1168,1105],{"class":349},[343,1170,1171],{"class":371},"OrderObserver",[343,1173,1099],{"class":349},[343,1175,423],{"class":367},[343,1177,516],{"class":349},[343,1179,1180],{"class":345,"line":389},[343,1181,361],{"emptyLinePlaceholder":360},[343,1183,1184,1187,1189,1192,1194,1197,1199,1201,1203,1206,1208,1210],{"class":345,"line":394},[343,1185,1186],{"class":371},"    Event",[343,1188,1099],{"class":349},[343,1190,1191],{"class":450},"listen",[343,1193,1105],{"class":349},[343,1195,1196],{"class":371},"OrderPlaced",[343,1198,1099],{"class":349},[343,1200,423],{"class":367},[343,1202,1115],{"class":349},[343,1204,1205],{"class":371}," SendOrderConfirmation",[343,1207,1099],{"class":349},[343,1209,423],{"class":367},[343,1211,516],{"class":349},[343,1213,1214],{"class":345,"line":414},[343,1215,361],{"emptyLinePlaceholder":360},[343,1217,1218,1221,1224,1227,1230,1232,1234],{"class":345,"line":419},[343,1219,1220],{"class":349},"    $this->",[343,1222,1223],{"class":450},"commands",[343,1225,1226],{"class":349},"([",[343,1228,1229],{"class":371},"PruneAbandonedOrders",[343,1231,1099],{"class":349},[343,1233,423],{"class":367},[343,1235,1236],{"class":349},"]);\n",[343,1238,1239],{"class":345,"line":435},[343,1240,727],{"class":349},[199,1242,1243,1245,1246,1248,1249,1252,1253,1256,1257,1260,1261,322],{},[203,1244,937],{}," adds the ",[203,1247,317],{}," call for you. With ",[203,1250,1251],{},"osdd.events.discover"," on, the listeners of the layer's ",[203,1254,1255],{},"src\u002FListeners"," are registered without ",[203,1258,1259],{},"Event::listen()",": see ",[253,1262,80],{"href":81},[1264,1265,1266],"tip",{},[199,1267,1268,1269,1271],{},"Keep each layer's wiring in its own provider. A provider that registers classes of another layer hides a dependency that ",[203,1270,756],{}," does not show.",[747,1273,1275],{"id":1274},"two-providers-named-osddserviceprovider","Two providers named OsddServiceProvider",[199,1277,1278],{},"An OSDD project has two classes with that short name:",[212,1280,1281,1294],{},[215,1282,1283],{},[218,1284,1285,1288,1291],{},[221,1286,1287],{},"Class",[221,1289,1290],{},"Belongs to",[221,1292,1293],{},"Does",[231,1295,1296,1320],{},[218,1297,1298,1303,1309],{},[236,1299,1300],{},[203,1301,1302],{},"Lomkit\\Osdd\\OsddServiceProvider",[236,1304,1305,1306],{},"The package, in ",[203,1307,1308],{},"vendor\u002F",[236,1310,1311,1312,1315,1316,1319],{},"Registers the ",[203,1313,1314],{},"osdd:*"," commands, the layer discovery and its cache, the ",[203,1317,1318],{},"about"," section, event discovery, the Tinker and IDE Helper support",[218,1321,1322,1327,1332],{},[236,1323,1324],{},[203,1325,1326],{},"Technical\\Osdd\\Providers\\OsddServiceProvider",[236,1328,1329,1330],{},"Your application, created by ",[203,1331,110],{},[236,1333,1334,1335,1338,1339,1341],{},"A layer provider like any other: loads ",[203,1336,1337],{},"technical\u002Fosdd\u002Fconfig\u002Fosdd.php",", the skeleton migrations, and binds ",[203,1340,249],{}," as the default seeder",[1343,1344,1345],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}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);}",{"title":339,"searchDepth":346,"depth":357,"links":1347},[1348,1349,1350,1351,1352],{"id":749,"depth":357,"text":750},{"id":865,"depth":357,"text":866},{"id":983,"depth":357,"text":984},{"id":1131,"depth":357,"text":1132},{"id":1274,"depth":357,"text":1275},"How each layer wires its migrations, seeders, routes, views and config through a provider of its own.","md",null,{},{"title":46,"description":1353},{"loc":47},"OyRutuHTLMgKDAd_30XlljEZGqyvj1wSPit-0slE8s4",[1361,1363],{"title":42,"path":43,"stem":44,"description":1362,"children":-1},"The rule osdd:check enforces between layers, what it reads, and how to fix or ignore a violation.",{"title":56,"path":57,"stem":58,"description":1364,"children":-1},"Take a new domain from an empty layer to a routed, authorized, seeded and tested resource.",1794437210447]