8000 Adds command · bbredewold/nativephp-laravel@f222947 · GitHub
[go: up one dir, main page]

Skip to content

Commit f222947

Browse files
committed
Adds command
1 parent 0a1f8e9 commit f222947

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/Commands/FreshCommand.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Native\Laravel\Commands;
4+
5+
use Illuminate\Console\Command;
6+
use Native\Laravel\NativeServiceProvider;
7+
8+
class FreshCommand extends Command
9+
{
10+
protected $description = 'Run the database migrations in the NativePHP development environment';
11+
12+
protected $signature = 'native:migrate fresh';
13+
14+
public function handle()
15+
{
16+
unlink(config('nativephp-internal.database_path'));
17+
18+
(new NativeServiceProvider($this->laravel))->rewriteDatabase();
19+
}
20+
21+
}

0 commit comments

Comments
 (0)
0