Skip to content

Commit

Permalink
Merge pull request #81 from shanerbaner82/main
Browse files Browse the repository at this point in the history
Adds 'php artisan native:migrate fresh' command
  • Loading branch information
mpociot committed Aug 1, 2023
2 parents a4605f0 + 46d896e commit 2a2fd25
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Commands/FreshCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Native\Laravel\Commands;

use Illuminate\Console\Command;
use Native\Laravel\NativeServiceProvider;

class FreshCommand extends Command
{
protected $description = 'Run the database migrations in the NativePHP development environment';

protected $signature = 'native:migrate fresh';

public function handle()
{
unlink(config('nativephp-internal.database_path'));

(new NativeServiceProvider($this->laravel))->rewriteDatabase();

$this->call('native:migrate');
}

}

0 comments on commit 2a2fd25

Please sign in to comment.