[{"data":1,"prerenderedAt":407},["ShallowReactive",2],{"navigation":3,"\u002Fguides\u002Fremoving-a-layer":193,"\u002Fguides\u002Fremoving-a-layer-surround":402},[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":92,"body":195,"description":394,"extension":395,"links":396,"meta":397,"navigation":398,"path":93,"seo":399,"sitemap":400,"stem":94,"__hash__":401},"docs\u002F3.guides\u002F10.removing-a-layer.md",{"type":196,"value":197,"toc":392},"minimark",[198,205,379,388],[199,200,201,204],"p",{},[202,203,138],"code",{}," refuses a layer that another layer still requires. Remove a layer in this order.",[206,207,209,214,249,265,269,282,296,300,317,335,339,354,361,365,372,376],"steps",{"level":208},"3",[210,211,213],"h3",{"id":212},"find-who-depends-on-it","Find who depends on it",[215,216,221],"pre",{"className":217,"code":218,"language":219,"meta":220,"style":220},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","php artisan osdd:graph\nphp artisan osdd:list\n","bash","",[202,222,223,239],{"__ignoreMap":220},[224,225,228,232,236],"span",{"class":226,"line":227},"line",1,[224,229,231],{"class":230},"sBMFI","php",[224,233,235],{"class":234},"sfazB"," artisan",[224,237,238],{"class":234}," osdd:graph\n",[224,240,242,244,246],{"class":226,"line":241},2,[224,243,231],{"class":230},[224,245,235],{"class":234},[224,247,248],{"class":234}," osdd:list\n",[199,250,251,253,254,257,258,261,262,264],{},[202,252,126],{}," shows the layers that require ",[202,255,256],{},"functional\u002Flegacy","; the ",[202,259,260],{},"Requires"," row of ",[202,263,118],{}," shows the same for each layer.",[210,266,268],{"id":267},"cut-the-dependencies","Cut the dependencies",[199,270,271,272,274,275,278,279,281],{},"In each of those layers, remove the code that uses ",[202,273,256],{},", then its requirement from ",[202,276,277],{},"composer.json",". ",[202,280,122],{}," tells you when the code is clean:",[215,283,285],{"className":217,"code":284,"language":219,"meta":220,"style":220},"php artisan osdd:check\n",[202,286,287],{"__ignoreMap":220},[224,288,289,291,293],{"class":226,"line":227},[224,290,231],{"class":230},[224,292,235],{"class":234},[224,294,295],{"class":234}," osdd:check\n",[210,297,299],{"id":298},"remove-the-layer","Remove the layer",[215,301,303],{"className":217,"code":302,"language":219,"meta":220,"style":220},"php artisan osdd:remove functional\u002Flegacy\n",[202,304,305],{"__ignoreMap":220},[224,306,307,309,311,314],{"class":226,"line":227},[224,308,231],{"class":230},[224,310,235],{"class":234},[224,312,313],{"class":234}," osdd:remove",[224,315,316],{"class":234}," functional\u002Flegacy\n",[199,318,319,320,322,323,326,327,330,331,334],{},"The command prints every change, asks for confirmation, then removes the layer from the root ",[202,321,277],{}," and ",[202,324,325],{},"phpunit.xml"," and deletes its directory. Pass ",[202,328,329],{},"--keep-files"," to keep the directory. In a script, pass ",[202,332,333],{},"--force --composer-update",".",[210,336,338],{"id":337},"run-composer-right-away","Run Composer right away",[215,340,342],{"className":217,"code":341,"language":219,"meta":220,"style":220},"composer update functional\u002Flegacy\n",[202,343,344],{"__ignoreMap":220},[224,345,346,349,352],{"class":226,"line":227},[224,347,348],{"class":230},"composer",[224,350,351],{"class":234}," update",[224,353,316],{"class":234},[199,355,356,357,360],{},"Until Composer runs, Laravel's package manifest still lists the deleted layer's provider, and every ",[202,358,359],{},"artisan"," command fails with a class-not-found error.",[210,362,364],{"id":363},"rebuild-the-caches","Rebuild the caches",[199,366,367,368,371],{},"When config, routes or events are cached, run ",[202,369,370],{},"php artisan optimize"," again: those caches still name the layer's classes.",[210,373,375],{"id":374},"drop-its-tables","Drop its tables",[199,377,378],{},"The tables of the layer's migrations stay in the database. Drop them with a migration in another layer when they are no longer needed.",[199,380,381,382,387],{},"See ",[383,384,385],"a",{"href":139},[202,386,138],{}," for every option and message.",[389,390,391],"style",{},"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);}",{"title":220,"searchDepth":227,"depth":241,"links":393},[],"Retire a domain safely, from the layers that still use it to the tables it leaves behind.","md",null,{},true,{"title":92,"description":394},{"loc":93},"k5h6p2ZkcnRH_g7UOyTQ-tcZVJRMNgupXKctxcP4hQU",[403,405],{"title":88,"path":89,"stem":90,"description":404,"children":-1},"Deploy an OSDD application so no request scans the layer folders, and know which cache to rebuild after a change.",{"title":96,"path":97,"stem":98,"description":406,"children":-1},"Keep the tenant migrations and seeders of each layer apart, and hand them to stancl\u002Ftenancy or spatie\u002Flaravel-multitenancy.",1794437210447]