This commit is contained in:
Saeed Vaziry
2024-08-20 21:26:27 +02:00
committed by GitHub
parent 431da1b728
commit 7f5e68e131
47 changed files with 1380 additions and 99 deletions

View File

@ -8,9 +8,12 @@
use App\Models\Site;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Foundation\Testing\WithFaker;
class DatabaseSeeder extends Seeder
{
use WithFaker;
/**
* Seed the application's database.
*/
@ -20,6 +23,12 @@ public function run(): void
'name' => 'Test User',
'email' => 'user@example.com',
]);
$this->createResources($user);
}
private function createResources(User $user): void
{
$server = Server::factory()->create([
'user_id' => $user->id,
'project_id' => $user->currentProject->id,