File tree Expand file tree Collapse file tree 6 files changed +30
-8
lines changed Expand file tree Collapse file tree 6 files changed +30
-8
lines changed Original file line number Diff line number Diff line change 9
9
use Illuminate \Support \Facades \File ;
10
10
use Illuminate \Support \Facades \Process ;
11
11
use Native \Laravel \Support \Environment ;
12
+ use Symfony \Component \Console \Attribute \AsCommand ;
12
13
13
14
use function Laravel \Prompts \error ;
14
15
use function Laravel \Prompts \info ;
17
18
use function Laravel \Prompts \outro ;
18
19
use function Laravel \Prompts \select ;
19
20
21
+ #[AsCommand(
22
+ name: 'native:debug ' ,
23
+ description: 'Generate debug information required for opening an issue. ' ,
24
+ )]
20
25
class DebugCommand extends Command implements PromptsForMissingInput
21
26
{
22
27
protected $ signature = 'native:debug {output} ' ;
23
28
24
- protected $ description = 'Generate debug information required for opening an issue. ' ;
25
-
26
29
private Collection $ debugInfo ;
27
30
28
31
public function handle (): void
Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Database \Console \Migrations \FreshCommand as BaseFreshCommand ;
6
6
use Native \Laravel \NativeServiceProvider ;
7
+ use Symfony \Component \Console \Attribute \AsCommand ;
7
8
9
+ #[AsCommand(
10
+ name: 'native:migrate:fresh ' ,
11
+ description: 'Drop all tables and re-run all migrations in the NativePHP development environment ' ,
12
+ )]
8
13
class FreshCommand extends BaseFreshCommand
9
14
{
10
15
protected $ name = 'native:migrate:fresh ' ;
Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Console \Command ;
6
6
use Native \Laravel \Contracts \ProvidesPhpIni ;
7
+ use Symfony \Component \Console \Attribute \AsCommand ;
7
8
9
+ #[AsCommand(
10
+ name: 'native:php-ini ' ,
11
+ description: 'Load the PHP configuration for the NativePHP development environment ' ,
12
+ )]
8
13
class LoadPHPConfigurationCommand extends Command
9
14
{
10
15
protected $ signature = 'native:php-ini ' ;
Original file line number Diff line number Diff line change 3
3
namespace Native \Laravel \Commands ;
4
4
5
5
use Illuminate \Console \Command ;
6
+ use Symfony \Component \Console \Attribute \AsCommand ;
6
7
8
+ #[AsCommand(
9
+ name: 'native:config ' ,
10
+ description: 'Load the startup configuration for the NativePHP development environment ' ,
11
+ )]
7
12
class LoadStartupConfigurationCommand extends Command
8
13
{
9
14
protected $ signature = 'native:config ' ;
Original file line number Diff line number Diff line change 6
6
use Illuminate \Database \Console \Migrations \MigrateCommand as BaseMigrateCommand ;
7
7
use Illuminate \Database \Migrations \Migrator ;
8
8
use Native \Laravel \NativeServiceProvider ;
9
+ use Symfony \Component \Console \Attribute \AsCommand ;
9
10
11
+ #[AsCommand(
12
+ name: 'native:migrate ' ,
13
+ description: 'Run the database migrations in the NativePHP development environment ' ,
14
+ )]
10
15
class MigrateCommand extends BaseMigrateCommand
11
16
{
12
- protected $ description = 'Run the database migrations in the NativePHP development environment ' ;
13
-
14
17
public function __construct (Migrator $ migrator , Dispatcher $ dispatcher )
15
18
{
16
19
$ this ->signature = 'native: ' .$ this ->signature ;
Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Database \Console \Seeds \SeedCommand as BaseSeedCommand ;
6
6
use Native \Laravel \NativeServiceProvider ;
7
+ use Symfony \Component \Console \Attribute \AsCommand ;
7
8
9
+ #[AsCommand(
10
+ name: 'native:seed ' ,
11
+ description: 'Seed the database in the NativePHP development environment ' ,
12
+ )]
8
13
class SeedDatabaseCommand extends BaseSeedCommand
9
14
{
10
- protected $ name = 'native:db:seed ' ;
11
-
12
- protected $ description = 'Run the database seeders in the NativePHP development environment ' ;
13
-
14
15
public function handle ()
15
16
{
16
17
(new NativeServiceProvider ($ this ->laravel ))->rewriteDatabase ();
You can’t perform that action at this time.
0 commit comments