3:I[5613,[],""] 4:I[1778,[],""] 5:I[2266,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","787","static/chunks/787-34619535dc4c8b8e.js","185","static/chunks/app/layout-8e510c4a6ad04f5a.js"],"Providers"] 6:I[6080,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","787","static/chunks/787-34619535dc4c8b8e.js","185","static/chunks/app/layout-8e510c4a6ad04f5a.js"],"Layout"] 7:I[5250,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","976","static/chunks/app/docs/guide/form/page-4d467dc7e44ea2c8.js"],""] 0:["eLuBIjOTKDjvNSEcdbrLy",[[["",{"children":["docs",{"children":["guide",{"children":["form",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["docs",{"children":["guide",{"children":["form",{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children","guide","children","form","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children","guide","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},[null,["$","html",null,{"lang":"en","className":"h-full antialiased __variable_aaf875 __variable_b436a8","suppressHydrationWarning":true,"children":["$","body",null,{"className":"flex min-h-full bg-white dark:bg-slate-900","children":["$","$L5",null,{"children":["$","$L6",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":["$","div",null,{"className":"min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16","children":["$","div",null,{"className":"flex h-full flex-col items-center justify-center text-center","children":[["$","p",null,{"className":"font-display text-sm font-medium text-slate-900 dark:text-white","children":"404"}],["$","h1",null,{"className":"mt-3 font-display text-3xl tracking-tight text-slate-900 dark:text-white","children":"Page not found"}],["$","p",null,{"className":"mt-2 text-sm text-slate-500 dark:text-slate-400","children":"Sorry, we couldn’t find the page you’re looking for."}],["$","$L7",null,{"href":"/","className":"mt-8 text-sm font-medium text-slate-900 dark:text-white","children":"Go back home"}]]}]}],"notFoundStyles":[],"styles":null}]}]}]}]}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/ecb0509aa3fc3a51.css","precedence":"next","crossOrigin":""}]],"$L8"]]]] 9:I[4841,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","976","static/chunks/app/docs/guide/form/page-4d467dc7e44ea2c8.js"],"DocsHeader"] a:I[659,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","976","static/chunks/app/docs/guide/form/page-4d467dc7e44ea2c8.js"],"Fence"] b:I[5357,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","976","static/chunks/app/docs/guide/form/page-4d467dc7e44ea2c8.js"],"PrevNextLinks"] 2:["$","div",null,{"className":"min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16","children":[["$","article",null,{"children":[["$","$L9",null,{"title":"Form"}],["$","div",null,{"className":"prose prose-slate max-w-none dark:prose-invert dark:text-slate-400 prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem] prose-lead:text-slate-500 dark:prose-lead:text-slate-400 prose-a:font-semibold dark:prose-a:text-sky-400 prose-a:no-underline prose-a:shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,theme(colors.sky.300))] hover:prose-a:[--tw-prose-underline-size:6px] dark:[--tw-prose-background:theme(colors.slate.900)] dark:prose-a:shadow-[inset_0_calc(-1*var(--tw-prose-underline-size,2px))_0_0_var(--tw-prose-underline,theme(colors.sky.800))] dark:hover:prose-a:[--tw-prose-underline-size:6px] prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg dark:prose-pre:bg-slate-800/60 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10 dark:prose-hr:border-slate-800","children":[["$","div",null,{"className":"my-8 flex rounded-3xl p-6 callout bg-sky-50 dark:bg-slate-800/60 dark:ring-1 dark:ring-slate-300/10","children":[["$","svg",null,{"aria-hidden":"true","viewBox":"0 0 32 32","fill":"none","className":"h-8 w-8 flex-none [--icon-foreground:theme(colors.slate.900)] [--icon-background:theme(colors.white)]","children":[["$","defs",null,{"children":[["$","radialGradient",null,{"cx":0,"cy":0,"r":1,"gradientUnits":"userSpaceOnUse","id":":S1:-gradient","gradientTransform":"matrix(0 21 -21 0 20 11)","children":[["$","stop","0",{"stopColor":"#0EA5E9"}],["$","stop","1",{"stopColor":"#22D3EE","offset":".527"}],["$","stop","2",{"stopColor":"#818CF8","offset":1}]]}],["$","radialGradient",null,{"cx":0,"cy":0,"r":1,"gradientUnits":"userSpaceOnUse","id":":S1:-gradient-dark","gradientTransform":"matrix(0 24.5001 -19.2498 0 16 5.5)","children":[["$","stop","0",{"stopColor":"#0EA5E9"}],["$","stop","1",{"stopColor":"#22D3EE","offset":".527"}],["$","stop","2",{"stopColor":"#818CF8","offset":1}]]}]]}],["$","g",null,{"className":"dark:hidden","children":[["$","circle",null,{"cx":20,"cy":20,"r":12,"fill":"url(#:S1:-gradient)"}],["$","path",null,{"fillRule":"evenodd","clipRule":"evenodd","d":"M20 24.995c0-1.855 1.094-3.501 2.427-4.792C24.61 18.087 26 15.07 26 12.231 26 7.133 21.523 3 16 3S6 7.133 6 12.23c0 2.84 1.389 5.857 3.573 7.973C10.906 21.494 12 23.14 12 24.995V27a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2.005Z","className":"fill-[var(--icon-background)]","fillOpacity":0.5}],["$","path",null,{"d":"M25 12.23c0 2.536-1.254 5.303-3.269 7.255l1.391 1.436c2.354-2.28 3.878-5.547 3.878-8.69h-2ZM16 4c5.047 0 9 3.759 9 8.23h2C27 6.508 21.998 2 16 2v2Zm-9 8.23C7 7.76 10.953 4 16 4V2C10.002 2 5 6.507 5 12.23h2Zm3.269 7.255C8.254 17.533 7 14.766 7 12.23H5c0 3.143 1.523 6.41 3.877 8.69l1.392-1.436ZM13 27v-2.005h-2V27h2Zm1 1a1 1 0 0 1-1-1h-2a3 3 0 0 0 3 3v-2Zm4 0h-4v2h4v-2Zm1-1a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2Zm0-2.005V27h2v-2.005h-2ZM8.877 20.921C10.132 22.136 11 23.538 11 24.995h2c0-2.253-1.32-4.143-2.731-5.51L8.877 20.92Zm12.854-1.436C20.32 20.852 19 22.742 19 24.995h2c0-1.457.869-2.859 2.122-4.074l-1.391-1.436Z","className":"fill-[var(--icon-foreground)]"}],["$","path",null,{"d":"M20 26a1 1 0 1 0 0-2v2Zm-8-2a1 1 0 1 0 0 2v-2Zm2 0h-2v2h2v-2Zm1 1V13.5h-2V25h2Zm-5-11.5v1h2v-1h-2Zm3.5 4.5h5v-2h-5v2Zm8.5-3.5v-1h-2v1h2ZM20 24h-2v2h2v-2Zm-2 0h-4v2h4v-2Zm-1-10.5V25h2V13.5h-2Zm2.5-2.5a2.5 2.5 0 0 0-2.5 2.5h2a.5.5 0 0 1 .5-.5v-2Zm2.5 2.5a2.5 2.5 0 0 0-2.5-2.5v2a.5.5 0 0 1 .5.5h2ZM18.5 18a3.5 3.5 0 0 0 3.5-3.5h-2a1.5 1.5 0 0 1-1.5 1.5v2ZM10 14.5a3.5 3.5 0 0 0 3.5 3.5v-2a1.5 1.5 0 0 1-1.5-1.5h-2Zm2.5-3.5a2.5 2.5 0 0 0-2.5 2.5h2a.5.5 0 0 1 .5-.5v-2Zm2.5 2.5a2.5 2.5 0 0 0-2.5-2.5v2a.5.5 0 0 1 .5.5h2Z","className":"fill-[var(--icon-foreground)]"}]]}],["$","g",null,{"className":"hidden dark:inline","children":["$","path",null,{"fillRule":"evenodd","clipRule":"evenodd","d":"M16 2C10.002 2 5 6.507 5 12.23c0 3.144 1.523 6.411 3.877 8.691.75.727 1.363 1.52 1.734 2.353.185.415.574.726 1.028.726H12a1 1 0 0 0 1-1v-4.5a.5.5 0 0 0-.5-.5A3.5 3.5 0 0 1 9 14.5V14a3 3 0 1 1 6 0v9a1 1 0 1 0 2 0v-9a3 3 0 1 1 6 0v.5a3.5 3.5 0 0 1-3.5 3.5.5.5 0 0 0-.5.5V23a1 1 0 0 0 1 1h.36c.455 0 .844-.311 1.03-.726.37-.833.982-1.626 1.732-2.353 2.354-2.28 3.878-5.547 3.878-8.69C27 6.507 21.998 2 16 2Zm5 25a1 1 0 0 0-1-1h-8a1 1 0 0 0-1 1 3 3 0 0 0 3 3h4a3 3 0 0 0 3-3Zm-8-13v1.5a.5.5 0 0 1-.5.5 1.5 1.5 0 0 1-1.5-1.5V14a1 1 0 1 1 2 0Zm6.5 2a.5.5 0 0 1-.5-.5V14a1 1 0 1 1 2 0v.5a1.5 1.5 0 0 1-1.5 1.5Z","fill":"url(#:S1:-gradient-dark)"}]}]]}],["$","div",null,{"className":"ml-4 flex-auto","children":[["$","p",null,{"className":"m-0 font-display text-xl text-sky-900 dark:text-sky-400","children":"Lear more"}],["$","div",null,{"className":"prose mt-2.5 text-sky-800 [--tw-prose-background:theme(colors.sky.50)] prose-a:text-sky-900 prose-code:text-sky-900 dark:text-slate-300 dark:prose-code:text-slate-300","children":["$","p",null,{"children":["Read more about API for ",["$","a",null,{"href":"/docs/api/html","children":"html"}]," and ",["$","a",null,{"href":"/docs/api/form","children":"form"}]," class."]}]}]]}]]}],["$","p",null,{"children":"Creation"}],["$","$La",null,{"language":"php","children":"function add(): View|Redirect\n{\n $form = new Form($this->request);\n $form->rules = [\n 'name' => ['required', 'unique_username'],\n 'first_name' => ['required'],\n 'last_name' => ['required'],\n 'email' => ['required', 'email'],\n 'role' => ['required', 'option' => ['reader','editor', 'administrator']],\n 'password' => ['required'],\n 'password2' => ['required', RepeatedPasswordValidator::class]];\n $roles = ['admin' => 'Administrator', 'reader' => 'Reader', 'editor' => 'Editor'];\n if ($this->request->isPost() and $form->validate()->isValid()) {\n $user = $this->request->toObject();\n $this->userService->add($user);\n return redirect('/admin/users');\n }\n\n return view(\"@backend/users/add\", ['form' => $form, 'roles' => $roles]);\n}\n"}],["$","$La",null,{"language":"html","children":"
\n {{ $form->label(\"name\", \"Username\") }}\n {{ $form->text(\"name\") }}\n {{ $form->error(\"name\") }}\n\n {{ $form->label(\"first_name\", \"First name\") }}\n {{ $form->text(\"first_name\") }}\n {{ $form->error(\"first_name\") }}\n\n {{ $form->label(\"last_name\", \"Last name\") }}\n {{ $form->text(\"last_name\") }}\n {{ $form->error(\"last_name\") }}\n\n {{ $form->label(\"email\", \"Email\") }}\n {{ $form->text(\"email\") }}\n {{ $form->error(\"email\") }}\n\n {{ $form->label(\"password\", \"Password\") }}\n {{ $form->password(\"password\") }}\n {{ $form->error(\"password\") }}\n\n {{ $form->label(\"password2\", \"Password\") }}\n {{ $form->password(\"password2\") }}\n {{ $form->error(\"password2\") }}\n\n {{ $form->label(\"role\", \"Roles\") }}\n {{ $form->select(\"role\", $roles) }}\n {{ $form->error(\"role\") }}\n\n \n
\n"}],["$","p",null,{"children":"Update"}]]}]]}],["$","$Lb",null,{}]]}] 8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Stormmore Guide - Form - Docs"}],["$","meta","3",{"name":"description","content":"Stormmore CRUD application."}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"48x48"}],["$","meta","5",{"name":"next-size-adjust"}]] 1:null