[{"data":1,"prerenderedAt":815},["ShallowReactive",2],{"navigation":3,"\u002Fcommands\u002Fosdd-start":193,"\u002Fcommands\u002Fosdd-start-surround":810},[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":110,"body":195,"description":802,"extension":803,"links":804,"meta":805,"navigation":806,"path":111,"seo":807,"sitemap":808,"stem":112,"__hash__":809},"docs\u002F4.commands\u002F02.osdd-start.md",{"type":196,"value":197,"toc":790},"minimark",[198,217,242,245,253,267,272,336,352,372,376,381,386,430,433,505,515,519,523,566,600,604,629,633,647,651,674,693,706,710,723,746,750,756,759,773,786],[199,200,201,204,205,208,209,212,213,216],"p",{},[202,203,110],"code",{}," replaces the ",[202,206,207],{},"app\u002F",", ",[202,210,211],{},"database\u002F"," and ",[202,214,215],{},"config\u002F"," folders of a fresh Laravel project with two layers.",[218,219,224],"pre",{"className":220,"code":221,"language":222,"meta":223,"style":223},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","php artisan osdd:start\n","bash","",[202,225,226],{"__ignoreMap":223},[227,228,231,235,239],"span",{"class":229,"line":230},"line",1,[227,232,234],{"class":233},"sBMFI","php",[227,236,238],{"class":237},"sfazB"," artisan",[227,240,241],{"class":237}," osdd:start\n",[199,243,244],{},"It asks for confirmation before it changes anything (default: no):",[218,246,251],{"className":247,"code":249,"language":250},[248],"language-text","osdd:start deletes app\u002F, config\u002F and database\u002F (database\u002Fdatabase.sqlite is kept). Continue?\n","text",[202,252,249],{"__ignoreMap":223},[254,255,256],"warning",{},[199,257,258,259,262,263,266],{},"Run it once, on a fresh project. It refuses to run when ",[202,260,261],{},"functional\u002Fusers"," or ",[202,264,265],{},"technical\u002Fosdd"," already exists, so it cannot run twice.",[268,269,271],"h2",{"id":270},"options","Options",[273,274,275,288],"table",{},[276,277,278],"thead",{},[279,280,281,285],"tr",{},[282,283,284],"th",{},"Option",[282,286,287],{},"Description",[289,290,291,309,323],"tbody",{},[279,292,293,299],{},[294,295,296],"td",{},[202,297,298],{},"--force",[294,300,301,302,208,304,212,306,308],{},"Delete ",[202,303,207],{},[202,305,215],{},[202,307,211],{}," without asking. Required without a terminal.",[279,310,311,316],{},[294,312,313],{},[202,314,315],{},"--composer-update",[294,317,318,319,322],{},"Run ",[202,320,321],{},"composer update functional\u002Fusers technical\u002Fosdd"," without asking.",[279,324,325,330],{},[294,326,327],{},[202,328,329],{},"--no-composer-update",[294,331,332,333,322],{},"Skip ",[202,334,335],{},"composer update",[199,337,338,339,342,343,345,346,348,349,351],{},"Without a terminal (CI, a script, a coding agent) or with ",[202,340,341],{},"-n",", the command fails and changes nothing unless you pass ",[202,344,298],{},", and it skips ",[202,347,335],{}," unless you pass ",[202,350,315],{},":",[218,353,355],{"className":220,"code":354,"language":222,"meta":223,"style":223},"php artisan osdd:start --force --composer-update\n",[202,356,357],{"__ignoreMap":223},[227,358,359,361,363,366,369],{"class":229,"line":230},[227,360,234],{"class":233},[227,362,238],{"class":237},[227,364,365],{"class":237}," osdd:start",[227,367,368],{"class":237}," --force",[227,370,371],{"class":237}," --composer-update\n",[268,373,375],{"id":374},"what-it-does","What it does",[377,378,380],"h3",{"id":379},"creates-the-users-layer","Creates the users layer",[199,382,383,385],{},[202,384,261],{}," holds:",[387,388,389,400,405,410,425],"ul",{},[390,391,392,395,396,399],"li",{},[202,393,394],{},"src\u002FModels\u002FUser.php",", the ",[202,397,398],{},"User"," model",[390,401,402],{},[202,403,404],{},"database\u002Ffactories\u002FUserFactory.php",[390,406,407],{},[202,408,409],{},"database\u002Fseeders\u002FUsersSeeder.php",[390,411,412,415,416,208,419,212,422],{},[202,413,414],{},"database\u002Fmigrations\u002F0001_01_01_000000_create_users_table.php",", the skeleton migration: ",[202,417,418],{},"users",[202,420,421],{},"password_reset_tokens",[202,423,424],{},"sessions",[390,426,427],{},[202,428,429],{},"src\u002FProviders\u002FUsersServiceProvider.php",[199,431,432],{},"The provider loads the layer's migrations and seeder, and points Laravel's default auth provider to the layer's model:",[218,434,438],{"className":435,"code":436,"filename":437,"language":234,"meta":223,"style":223},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","public function register(): void\n{\n    config(['auth.providers.users.model' => User::class]);\n}\n","functional\u002Fusers\u002Fsrc\u002FProviders\u002FUsersServiceProvider.php",[202,439,440,461,467,499],{"__ignoreMap":223},[227,441,442,446,449,453,457],{"class":229,"line":230},[227,443,445],{"class":444},"spNyl","public",[227,447,448],{"class":444}," function",[227,450,452],{"class":451},"s2Zo4"," register",[227,454,456],{"class":455},"sMK4o","():",[227,458,460],{"class":459},"sbssI"," void\n",[227,462,464],{"class":229,"line":463},2,[227,465,466],{"class":455},"{\n",[227,468,470,473,476,479,482,484,487,490,493,496],{"class":229,"line":469},3,[227,471,472],{"class":451},"    config",[227,474,475],{"class":455},"([",[227,477,478],{"class":455},"'",[227,480,481],{"class":237},"auth.providers.users.model",[227,483,478],{"class":455},[227,485,486],{"class":455}," =>",[227,488,489],{"class":233}," User",[227,491,492],{"class":455},"::",[227,494,495],{"class":459},"class",[227,497,498],{"class":455},"]);\n",[227,500,502],{"class":229,"line":501},4,[227,503,504],{"class":455},"}\n",[199,506,507,510,511,514],{},[202,508,509],{},"auth()->user()"," and the guards return a ",[202,512,513],{},"Functional\\Users\\Models\\User",".",[377,516,518],{"id":517},"creates-the-osdd-layer","Creates the osdd layer",[199,520,521,385],{},[202,522,265],{},[387,524,525,534,547,561],{},[390,526,527,395,530],{},[202,528,529],{},"config\u002Fosdd.php",[531,532,533],"a",{"href":167},"OSDD configuration",[390,535,536,539,540,208,543,546],{},[202,537,538],{},"database\u002Fmigrations\u002F0001_01_01_000001_create_cache_table.php"," (",[202,541,542],{},"cache",[202,544,545],{},"cache_locks",")",[390,548,549,539,552,208,555,208,558,546],{},[202,550,551],{},"database\u002Fmigrations\u002F0001_01_01_000002_create_jobs_table.php",[202,553,554],{},"jobs",[202,556,557],{},"job_batches",[202,559,560],{},"failed_jobs",[390,562,563],{},[202,564,565],{},"src\u002FProviders\u002FOsddServiceProvider.php",[199,567,568,571,572,574,575,581,582,585,586,208,589,212,592,595,596,599],{},[202,569,570],{},"Technical\\Osdd\\Providers\\OsddServiceProvider"," overrides the package defaults with ",[202,573,529],{},", loads the two migrations, and binds ",[531,576,578],{"href":577},"\u002Fapi-reference\u002Fseeder-registry#layersseeder",[202,579,580],{},"LayersSeeder"," as the default seeder. The database session, cache and queue drivers of a fresh project keep working after ",[202,583,584],{},"php artisan migrate",", and ",[202,587,588],{},"db:seed",[202,590,591],{},"migrate --seed",[202,593,594],{},"RefreshDatabase"," with ",[202,597,598],{},"$seed = true"," run the layer seeders.",[377,601,603],{"id":602},"registers-both-layers","Registers both layers",[199,605,606,607,610,611,212,614,617,618,212,620,622,623,625,626,514],{},"The root ",[202,608,609],{},"composer.json"," gets a path repository for ",[202,612,613],{},".\u002Ffunctional\u002F*",[202,615,616],{},".\u002Ftechnical\u002F*",", and requires ",[202,619,261],{},[202,621,265],{},". Each layer's ",[202,624,609],{}," lists its provider under ",[202,627,628],{},"extra.laravel.providers",[377,630,632],{"id":631},"cleans-bootstrapprovidersphp","Cleans bootstrap\u002Fproviders.php",[199,634,635,636,639,640,643,644,646],{},"The command removes the ",[202,637,638],{},"App\\Providers\\..."," entries from ",[202,641,642],{},"bootstrap\u002Fproviders.php",": their classes are deleted with ",[202,645,207],{},", and Laravel discovers the layer providers through Composer. The providers of installed packages listed there stay.",[377,648,650],{"id":649},"deletes-the-legacy-folders","Deletes the legacy folders",[387,652,653,657,661],{},[390,654,655],{},[202,656,207],{},[390,658,659],{},[202,660,215],{},[390,662,663,664,666,667,212,670,673],{},"everything in ",[202,665,211],{}," except ",[202,668,669],{},"database\u002Fdatabase.sqlite",[202,671,672],{},"database\u002F.gitignore",", so the default SQLite connection keeps working",[199,675,676,677,212,680,683,684,212,687,690,691,514],{},"It also removes the ",[202,678,679],{},"Database\\Factories\\",[202,681,682],{},"Database\\Seeders\\"," entries from the ",[202,685,686],{},"autoload",[202,688,689],{},"autoload-dev"," sections of the root ",[202,692,609],{},[694,695,696],"tip",{},[199,697,698,699,702,703,705],{},"The ",[202,700,701],{},"App\\"," autoload entry stays: Laravel reads it to find the application namespace. Keep it, even though no code lives in ",[202,704,207],{}," anymore.",[377,707,709],{"id":708},"runs-composer-update","Runs composer update",[199,711,712,713,715,716,719,720,722],{},"In a terminal, the command asks whether to run ",[202,714,321],{}," (default: yes). Otherwise it prints the command: run it before the next ",[202,717,718],{},"artisan"," command. When the update runs and fails, ",[202,721,110],{}," exits with 1; the layers stay in place.",[199,724,725,727,728,731,732,735,736,738,739,742,743,514],{},[202,726,335],{}," runs the file named by the ",[202,729,730],{},"COMPOSER_BINARY"," environment variable when it exists, else ",[202,733,734],{},"composer.phar"," in the project root, both with the PHP binary that runs ",[202,737,718],{},"; otherwise ",[202,740,741],{},"composer"," from the ",[202,744,745],{},"PATH",[268,747,749],{"id":748},"result","Result",[218,751,754],{"className":752,"code":753,"language":250},[248],"functional\u002F\n  users\u002F\n    composer.json\n    src\u002F\n      Models\u002FUser.php\n      Providers\u002FUsersServiceProvider.php\n    database\u002F\n      factories\u002FUserFactory.php\n      migrations\u002F0001_01_01_000000_create_users_table.php\n      seeders\u002FUsersSeeder.php\ntechnical\u002F\n  osdd\u002F\n    composer.json\n    config\u002Fosdd.php\n    database\u002F\n      migrations\u002F0001_01_01_000001_create_cache_table.php\n      migrations\u002F0001_01_01_000002_create_jobs_table.php\n    src\u002F\n      Providers\u002FOsddServiceProvider.php\ndatabase\u002F\n  database.sqlite\nbootstrap\u002F\n  providers.php\ncomposer.json\n",[202,755,753],{"__ignoreMap":223},[199,757,758],{},"Then create the tables:",[218,760,762],{"className":220,"code":761,"language":222,"meta":223,"style":223},"php artisan migrate\n",[202,763,764],{"__ignoreMap":223},[227,765,766,768,770],{"class":229,"line":230},[227,767,234],{"class":233},[227,769,238],{"class":237},[227,771,772],{"class":237}," migrate\n",[774,775,776],"note",{},[199,777,778,779,781,782,785],{},"After ",[202,780,110],{},", the cache, jobs, batches, failed jobs and sessions tables already exist in a layer. Add the notifications table with ",[202,783,784],{},"php artisan osdd:notifications-table --layer=technical\u002Fosdd"," if you need it.",[787,788,789],"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);}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 .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":223,"searchDepth":230,"depth":463,"links":791},[792,793,801],{"id":270,"depth":463,"text":271},{"id":374,"depth":463,"text":375,"children":794},[795,796,797,798,799,800],{"id":379,"depth":469,"text":380},{"id":517,"depth":469,"text":518},{"id":602,"depth":469,"text":603},{"id":631,"depth":469,"text":632},{"id":649,"depth":469,"text":650},{"id":708,"depth":469,"text":709},{"id":748,"depth":463,"text":749},"Convert a fresh Laravel project to layers.","md",null,{},true,{"title":110,"description":802},{"loc":111},"7zjgKJJcHi1RUUbh5kT0d9SLa2f-t9kjotMI9AJ5z2M",[811,813],{"title":106,"path":107,"stem":108,"description":812,"children":-1},"Every Artisan command Laravel OSDD registers.",{"title":114,"path":115,"stem":116,"description":814,"children":-1},"Create a layer, generate its first files and register it in Composer.",1794437211721]