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