File tree Expand file tree Collapse file tree
panel/lab/internals/panel/urls Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 <k-code >{{ $panel.urls.api }}</k-code >
1111 </k-text >
1212 </k-lab-example >
13+ <k-lab-example label =" panel" :code =" false" >
14+ <k-text >
15+ <p >
16+ <code >window.panel.urls.panel</code > returns the base URL for the
17+ Panel
18+ </p >
19+ <k-code >{{ $panel.urls.panel }}</k-code >
20+ </k-text >
21+ </k-lab-example >
1322 <k-lab-example label =" site" :code =" false" >
1423 <k-text >
1524 <p >
Original file line number Diff line number Diff line change @@ -315,8 +315,9 @@ public function url(): string
315315 public function urls (): array
316316 {
317317 return [
318- 'api ' => $ this ->kirby ->url ('api ' ),
319- 'site ' => $ this ->kirby ->url ('index ' )
318+ 'api ' => $ this ->kirby ->url ('api ' ),
319+ 'panel ' => $ this ->kirby ->url ('panel ' ),
320+ 'site ' => $ this ->kirby ->url ('index ' )
320321 ];
321322 }
322323
Original file line number Diff line number Diff line change @@ -158,8 +158,9 @@ public function testFilterOnlyRequestWithGlobal(): void
158158 $ expected = [
159159 'a ' => 'A ' ,
160160 'urls ' => [
161- 'api ' => '/api ' ,
162- 'site ' => '/ '
161+ 'api ' => '/api ' ,
162+ 'panel ' => '/panel ' ,
163+ 'site ' => '/ '
163164 ]
164165 ];
165166
@@ -487,6 +488,7 @@ public function testUrls(): void
487488 $ state = new State ();
488489 $ urls = $ state ->urls ();
489490 $ this ->assertArrayHasKey ('api ' , $ urls );
491+ $ this ->assertArrayHasKey ('panel ' , $ urls );
490492 $ this ->assertArrayHasKey ('site ' , $ urls );
491493 }
492494
You can’t perform that action at this time.
0 commit comments