このリポジトリは2023-09-09にアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュ、イシューの作成、プルリクエストはできません。
kikikan/backend/database/factories/FatherFactory.php

43 行
1.0 KiB
PHP
Raw 通常表示 履歴

2021-08-12 15:56:52 +09:00
<?php
namespace Database\Factories;
use App\Models\Father;
2021-10-15 15:49:43 +09:00
use Illuminate\Support\Facades\Hash;
2021-08-12 15:56:52 +09:00
use Illuminate\Database\Eloquent\Factories\Factory;
class FatherFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Father::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
2021-09-29 12:43:36 +09:00
$tel = [
'070'.rand(10000000, 99999999),
'080'.rand(10000000, 99999999),
'090'.rand(10000000, 99999999)
];
2021-08-12 15:56:52 +09:00
return [
'email' => $this->faker->email,
2021-10-15 15:49:43 +09:00
'password' => Hash::make('password'),
2021-09-29 12:43:36 +09:00
'company' => $this->faker->company,
2021-11-22 12:16:02 +09:00
'image' => '/assets/default/avatar.jpg',
2021-08-12 15:56:52 +09:00
'profile' => $this->faker->realText(49),
2021-09-29 12:43:36 +09:00
'tel' => $tel[rand(0, 2)],
2021-08-12 15:56:52 +09:00
'created_at' => $this->faker->dateTime,
'updated_at' => $this->faker->dateTime,
];
}
}