8000 Merge pull request #82 from phuclh/feature/add_native_db_seed_command · bbredewold/nativephp-laravel@e0f14bd · GitHub
[go: up one dir, main page]

Skip to content

Commit e0f14bd

Browse files
authored
Merge pull request NativePHP#82 from phuclh/feature/add_native_db_seed_command
2 parents 0a1f8e9 + 566ac6b commit e0f14bd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/Commands/SeedDatabaseCommand.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace Native\Laravel\Commands;
4+
5+
use Illuminate\Database\Console\Seeds\SeedCommand as BaseSeedCommand;
6+
use Native\Laravel\NativeServiceProvider;
7+
8+
class SeedDatabaseCommand extends BaseSeedCommand
9+
{
10+
protected $name = 'native:db:seed';
11+
protected $description = 'Run the database seeders in the NativePHP development environment';
12+
13+
public function handle()
14+
{
15+
(new NativeServiceProvider($this->laravel))->rewriteDatabase();
16+
17+
parent::handle();
18+
}
19+
}

0 commit comments

Comments
 (0)
0