Skip to content

Commit

Permalink
Merge branch 'patch-3' of https://github.com/milwad-dev/nativephp.com
Browse files Browse the repository at this point in the history
…into milwad-dev-patch-3
  • Loading branch information
mpociot committed Aug 3, 2023
2 parents 4fc8ad3 + f38a1a1 commit 3edcd50
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions resources/views/docs/1/the-basics/app-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,42 @@ class NativeAppServiceProvider
}
}
```

## Customize php.ini With Provider

you may to customize you php.ini with `NativeAppServiceProvider`:

```php
<?php

namespace App\Providers;

use Native\Laravel\Facades\Window;
use Native\Laravel\Contracts\ProvidesPhpIni;

class NativeAppServiceProvider implements ProvidesPhpIni
{
/**
* Executed once the native application has been booted.
* Use this method to open windows, register global shortcuts, etc.
*/
public function boot(): void
{
Window::open();
}


public function phpIni(): array
{
return [
'memory_limit' => '512M',
'display_errors' => '1',
'error_reporting' => 'E_ALL',
'max_execution_time' => '0',
'max_input_time' => '0',
];
}
}
```

> **_NOTE:_** For customize php.ini, you must implement the `ProvidesPhpIni` contract.

0 comments on commit 3edcd50

Please sign in to comment.