<?php namespace Database\Factories; use App\Models\Country; use App\Models\Language; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; /** * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User> */ class UserFactory extends Factory { /** * Define the model's default state. * * @return array<string, mixed> */ public function definition() { // Create Dependencies - should be loaded by seeding. $co = Country::findOrFail(61); $lo = Language::findOrFail(1); return [ 'id' => $this->faker->numberBetween(2048,65535), // 'created_at' // 'updated_at' //* 'site_id', // Needs to be passed in 'email' => $this->faker->unique()->safeEmail, 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret 'remember_token' => Str::random(10), 'active' => 1, // 'title' 'firstname' => $this->faker->name, 'lastname' => $this->faker->name, 'country_id' => $co->id, // 'address1' // 'address2' // 'city' // 'state' // 'postcode' 'emailable' => true, // 'parent_id'' 'language_id' => $lo->id, ]; } }