8000 Add native:db:seed command · NativePHP/laravel@566ac6b · GitHub
[go: up one dir, main page]

Skip to content

Commit 566ac6b

Browse files
committed
Add native:db:seed command
1 parent 0a1f8e9 commit 566ac6b

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