Windows support is here! 🔥 Read the full announcement →
NativePHP
⚠️ NativePHP is currently in alpha. We do not recommend distributing production releases of your applications yet.

Can you help us get production-ready?
Updating

#
The Updater

NativePHP ships with a built-in auto-update tool, which allows your users to update your application without needing to manually download and install new releases.

This leaves you to focus on building and releasing new versions of your application, without needing to worry about distributing those updates to your users.

macOS: Automatic updating is only supported for signed applications.

#
How it works

The updater works by checking a remote URL for a new version of your application. If a new version is found, the updater will download the new version and replace the existing application files with the new ones.

This means your application's builds need to be hosted online. NativePHP will automatically upload your application for you. After configuring the updater, simply use the php artisan native:publish command.

The updater supports three providers:

  • GitHub Releases (github)
  • Amazon S3 (s3)
  • DigitalOcean Spaces (spaces)

You can configure all settings for the updater in your config/nativephp.php file or via your .env file.

The updater will only run when your app is running in production mode.

#
Configuration

The default updater configuration looks like this:

1'updater' => [
2 'enabled' => env('NATIVEPHP_UPDATER_ENABLED', true),
3 
4 'default' => env('NATIVEPHP_UPDATER_PROVIDER', 'spaces'),
5 
6 'providers' => [
7 'github' => [
8 'driver' => 'github',
9 'repo' => env('GITHUB_REPO'),
10 'owner' => env('GITHUB_OWNER'),
11 'token' => env('GITHUB_TOKEN'),
12 'vPrefixedTagName' => env('GITHUB_V_PREFIXED_TAG_NAME', true),
13 'private' => env('GITHUB_PRIVATE', false),
14 'channel' => env('GITHUB_CHANNEL', 'latest'),
15 'releaseType' => env('GITHUB_RELEASE_TYPE', 'draft'),
16 ],
17 
18 's3' => [
19 'driver' => 's3',
20 'key' => env('AWS_ACCESS_KEY_ID'),
21 'secret' => env('AWS_SECRET_ACCESS_KEY'),
22 'region' => env('AWS_DEFAULT_REGION'),
23 'bucket' => env('AWS_BUCKET'),
24 'endpoint' => env('AWS_ENDPOINT'),
25 'path' => env('NATIVEPHP_UPDATER_PATH', null),
26 ],
27 
28 'spaces' => [
29 'driver' => 'spaces',
30 'key' => env('DO_SPACES_KEY_ID'),
31 'secret' => env('DO_SPACES_SECRET_ACCESS_KEY'),
32 'name' => env('DO_SPACES_NAME'),
33 'region' => env('DO_SPACES_REGION'),
34 'path' => env('NATIVEPHP_UPDATER_PATH', null),
35 ],
36 ],
37],

How to setup your storage and generate the relevant API credentials:

#
Disabling the updater

If you don't want your application to check for updates, you can disable the updater by setting the updater.enabled option to false in your config/nativephp.php file or via your .env file:

1NATIVEPHP_UPDATER_ENABLED=false