teams and users - DB migrations, seeders, models

This commit is contained in:
StudioTem committed 2023-01-17 10:28:16 +01:00
1 parent 2141a4da7c
commit 7c45871646
10 files changed
+235 -11

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
<?php
namespace Database\Factories;
use App\Models\Team;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Team>
*/
class TeamFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition()
{
return [
'name' => fake()->company(),
];
}
}
+6 -2
View File
@@ -18,11 +18,15 @@ class UserFactory extends Factory
public function definition()
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
'firstname' => fake()->firstname(),
'lastname' => fake()->lastname(),
'code' => strtoupper(Str::random(3)),
'work_start' => '9.0',
'work_end' => '17.0',
];
}