You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

66 lines
1.5 KiB

<?php
namespace Database\Factories;
use App\Documents\UserDocument;
use App\Models\ILaravel;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class ILaravelFactory extends Factory
{
use BaseFactory;
protected $model = ILaravel::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition()
{
return [
'group_id' => 1,
'user_id' => 100,
'name' => fake()->name(),
'email' => fake()->safeEmail(),
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
];
}
public static function list()
{
return [
'name:null',
'name:numeric',
'name:gtString',
'email:null',
'email:numeric',
'email:ltString',
'email:unique',
];
}
public function testGeneratorConfig()
{
return [
'store' => 'profile, guest',
'update' => 'profile, guest',
'show' => '',
'delete' => '',
];
}
public function dependencyProvider()
{
return [
'user_id' => UserDocument::factory()->create()->id
];
}
}