Add projects, environments, applications, databases
This commit is contained in:
21
database/seeders/DBSeeder.php
Normal file
21
database/seeders/DBSeeder.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Database;
|
||||
use App\Models\Environment;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DBSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$environment_1 = Environment::find(1);
|
||||
$database_1 = Database::create([
|
||||
'id' => 1,
|
||||
'name'=> "My first database"
|
||||
]);
|
||||
|
||||
$environment_1->databases()->attach($database_1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user