feat/factory_creation (#1)

Prepping for launch.

Reviewed-on: #1
Co-authored-by: Paul Couture <paul@paulcouture.com>
Co-committed-by: Paul Couture <paul@paulcouture.com>
This commit was merged in pull request #1.
This commit is contained in:
2023-12-14 11:33:03 -06:00
committed by Paul Couture
parent 8eb4d14909
commit c4398c641e
342 changed files with 60893 additions and 2557 deletions

View File

@@ -4,9 +4,23 @@ namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Hash;
use App\Models\Artist;
use App\Models\Artwork;
use App\Models\Episode;
use App\Models\Podcast;
use App\Models\Overlay;
use App\Models\User;
class UserFactory extends Factory
{
/**
* The name of the factory's corresponding model
*
* @var string
*/
protected $model = User::class;
/**
* Define the model's default state.
*
@@ -14,12 +28,14 @@ class UserFactory extends Factory
*/
public function definition()
{
$password = Hash::make(Str::random(rand(8, 16)));
return [
'name' => $this->faker->name(),
'email' => $this->faker->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'password' => $password,
'remember_token' => Str::random(10),
'legacy_id' => null,
];
}