42 lines
1.2 KiB
PHP
42 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Admin;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Facades\Hash;
|
|
use Illuminate\Support\Str;
|
|
|
|
class AdminFactory extends Factory
|
|
{
|
|
protected $model = Admin::class;
|
|
|
|
public function definition()
|
|
{
|
|
return [
|
|
'name' => $this->faker->unique()->userName(),
|
|
'full_name' => $this->faker->name(),
|
|
'email' => $this->faker->unique()->safeEmail(),
|
|
'email_verified_at' => now(),
|
|
'password' => Hash::make('password'),
|
|
'profile_photo_path' => null,
|
|
'about' => $this->faker->paragraph(),
|
|
'about_short' => $this->faker->sentence(),
|
|
'motivation' => $this->faker->paragraph(),
|
|
'website' => $this->faker->optional()->url(),
|
|
'phone' => $this->faker->optional()->phoneNumber(),
|
|
'phone_public' => $this->faker->boolean(),
|
|
'lang_preference' => 'en',
|
|
];
|
|
}
|
|
|
|
public function unverified()
|
|
{
|
|
return $this->state(function (array $attributes) {
|
|
return [
|
|
'email_verified_at' => null,
|
|
];
|
|
});
|
|
}
|
|
}
|