File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 3838 $ this ->next ();
3939 }
4040
41- $ page = new Page ([
42- 'slug ' => $ component ?? 'playground ' ,
41+ $ playgroundPage = new Page ([
42+ 'slug ' => 'playground ' ,
4343 'template ' => 'playground ' ,
4444 'content ' => [
45- 'title ' => $ component ? "Playground: {$ component }" : 'Playground ' ,
46- 'component ' => $ component
45+ 'title ' => 'Playground '
4746 ]
4847 ]);
4948
50- return site ()->visit ($ page );
49+ if ($ component ) {
50+ $ componentPage = new Page ([
51+ 'slug ' => $ component ,
52+ 'template ' => 'playground ' ,
53+ 'parent ' => $ playgroundPage ,
54+ 'content ' => [
55+ 'title ' => "Playground: {$ component }" ,
56+ 'component ' => $ component
57+ ]
58+ ]);
59+ return site ()->visit ($ componentPage );
60+ } else {
61+ return site ()->visit ($ playgroundPage );
62+ }
5163 }
5264 ]
5365 ]
You can’t perform that action at this time.
0 commit comments