Skip to content

Commit 3f17006

Browse files
committed
Update NativePHP configuration and add new command
1 parent 7b30d55 commit 3f17006

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

config/native-php.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<?php
22

33
return [
4-
'running' => env('NATIVE_PHP_RUNNING', false),
4+
'running' => env('NATIVEPHP_RUNNING', false),
55

6-
'storage_path' => env('NATIVE_PHP_STORAGE_PATH'),
6+
'storage_path' => env('NATIVEPHP_STORAGE_PATH'),
77

8-
'database_path' => env('NATIVE_PHP_DATABASE_PATH'),
8+
'database_path' => env('NATIVEPHP_DATABASE_PATH'),
99

10-
'version' => env('NATIVE_PHP_VERSION', '1.0.0'),
10+
'version' => env('NATIVEPHP_APP_VERSION', '1.0.0'),
1111

12-
'secret' => env('NATIVE_PHP_SECRET'),
12+
'secret' => env('NATIVEPHP_SECRET'),
1313

1414
'app_id' => env('NATIVEPHP_APP_ID'),
1515

1616
'deeplink_scheme' => env('NATIVEPHP_DEEPLINK_SCHEME'),
1717

1818
'author' => env('NATIVEPHP_APP_AUTHOR'),
1919

20-
'api_url' => env('NATIVE_PHP_API_URL', 'http://localhost:4000/api/'),
20+
'api_url' => env('NATIVEPHP_API_URL', 'http://localhost:4000/api/'),
2121

2222
'provider' => \App\Providers\NativeAppServiceProvider::class,
2323
];
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Native\Laravel\Commands;
4+
5+
use Illuminate\Console\Command;
6+
use Symfony\Component\Finder\Finder;
7+
8+
class LoadStartupConfigurationCommand extends Command
9+
{
10+
protected $signature = 'native:config';
11+
12+
public function handle()
13+
{
14+
echo json_encode(config('native-php'));
15+
}
16+
}

src/NativeServiceProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Illuminate\Support\Arr;
77
use Illuminate\Support\Facades\Config;
88
use Illuminate\Support\Facades\Storage;
9+
use Native\Laravel\Commands\LoadStartupConfigurationCommand;
910
use Native\Laravel\Commands\MinifyApplicationCommand;
1011
use Spatie\LaravelPackageTools\Package;
1112
use Spatie\LaravelPackageTools\PackageServiceProvider;
@@ -25,6 +26,7 @@ public function configurePackage(Package $package): void
2526
->name('native-php')
2627
->hasCommands([
2728
MinifyApplicationCommand::class,
29+
LoadStartupConfigurationCommand::class,
2830
])
2931
->hasConfigFile()
3032
->hasRoute('api')

0 commit comments

Comments
 (0)