Skip to content

Commit be14bfe

Browse files
authored
Merge pull request #31 from me-shaon/fix/app-lifecycle-doc
2 parents 068ae5c + b2545a2 commit be14bfe

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

resources/views/docs/1/the-basics/app-lifecycle.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,32 @@ For example, you may want to open a window, register global shortcuts, or config
2424
The default `NativeAppServiceProvider` looks like this:
2525

2626
```php
27+
<?php
28+
2729
namespace App\Providers;
2830

29-
use Native\Laravel\Facades\ContextMenu;
30-
use Native\Laravel\Facades\Dock;
3131
use Native\Laravel\Facades\Window;
32-
use Native\Laravel\GlobalShortcut;
33-
use Native\Laravel\Menu\Menu;
32+
use Native\Laravel\Contracts\ProvidesPhpIni;
3433

35-
class NativeAppServiceProvider
34+
class NativeAppServiceProvider implements ProvidesPhpIni
3635
{
3736
/**
3837
* Executed once the native application has been booted.
3938
* Use this method to open windows, register global shortcuts, etc.
4039
*/
4140
public function boot(): void
4241
{
43-
Menu::new()
44-
->appMenu()
45-
->submenu('About', Menu::new()
46-
->link('https://nativephp.com', 'NativePHP')
47-
)
48-
->submenu('View', Menu::new()
49-
->toggleFullscreen()
50-
->separator()
51-
->toggleDevTools()
52-
)
53-
->register();
54-
55-
Window::open()
56-
->width(800)
57-
->height(800);
42+
Window::open();
43+
}
44+
45+
/**
46+
* Return an array of php.ini directives to be set.
47+
*/
48+
public function phpIni(): array
49+
{
50+
return [
51+
];
5852
}
5953
}
54+
6055
```

0 commit comments

Comments
 (0)