Initial commit
This commit is contained in:
41
database/factories/AdminFactory.php
Normal file
41
database/factories/AdminFactory.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user