@@ -27,34 +27,40 @@ NativePHP is built to work best with Laravel. You can install it into an existin
27
27
28
28
## Install a NativePHP runtime
29
29
30
- ``` bash
30
+ ``` shell
31
31
composer require nativephp/electron
32
32
```
33
33
34
34
The Tauri runtime is coming soon.
35
35
36
36
## Run the NativePHP installer
37
37
38
- ``` bash
38
+ ``` shell
39
39
php artisan native:install
40
40
```
41
41
42
42
The NativePHP installer takes care of publishing the NativePHP service provider, which bootstraps the necessary
43
- dependencies for your application to work with the runtime you're using: Electron or Tauri. It also publishes the
44
- NativePHP configuration file to ` config/nativephp.php ` .
43
+ dependencies for your application to work with the runtime you're using: Electron or Tauri.
44
+
45
+ It also publishes the NativePHP configuration file to ` config/nativephp.php ` .
46
+
47
+ It adds the ` composer native:dev ` script to your ` composer.json ` , which you are free to modify to suit your needs.
45
48
46
49
Finally, it installs any other dependencies needed for the specific runtime you're using, e.g. for Electron it installs
47
50
the NPM dependencies.
48
51
49
- ** Whenever you set up NativePHP on a new machine or in CI, you should run the installer to make sure all of the
52
+ ** Whenever you set up NativePHP on a new machine or in CI, you should run the installer to make sure all the
50
53
necessary dependencies are in place to build your application.**
51
54
52
55
## Start the development server
53
56
54
- ``` bash
57
+ ** Heads up!** Before starting your app in a native context, try running it in the browser. You may bump into exceptions
58
+ which need addressing before you can run your app natively, and may be trickier to spot when doing so.
59
+
60
+ Once you're ready:
61
+
62
+ ``` shell
55
63
php artisan native:serve
56
64
```
57
65
58
- This spins up a development build of your application for local testing.
59
-
60
- And that's it! You should now see your Laravel application running in a native desktop window.
66
+ And that's it! You should now see your Laravel application running in a native desktop window. 🎉
0 commit comments