Skip to content

Commit b2545a2

Browse files
committed
fix: updated the 'app life cycle' code sample with the full class
1 parent c51862c commit b2545a2

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ 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.
@@ -42,5 +41,15 @@ class NativeAppServiceProvider
4241
{
4342
Window::open();
4443
}
44+
45+
/**
46+
* Return an array of php.ini directives to be set.
47+
*/
48+
public function phpIni(): array
49+
{
50+
return [
51+
];
52+
}
4553
}
54+
4655
```

0 commit comments

Comments
 (0)