fakerでランダムIDに

このコミットが含まれているのは:
守矢諏訪子 2021-11-02 22:40:03 +09:00
コミット 39e94546d0
6個のファイルの変更8行の追加8行の削除

ファイルの表示

@ -23,7 +23,7 @@ class EmailActivationFactory extends Factory
{
return [
'type' => $this->faker->numberBetween($min=0, $max=1),
'father_id' => 1,
'father_id' => rand(1, 10),
'email' => $this->faker->email,
'token' => $this->faker->creditCardNumber,
'ttl' => $this->faker->dateTime,

ファイルの表示

@ -22,8 +22,8 @@ class FatherRelationFactory extends Factory
public function definition()
{
return [
'father_id' => 1,
'child_id' => 1,
'father_id' => rand(1, 10),
'child_id' => rand(1, 10),
'created_at' => $this->faker->dateTime,
'updated_at' => $this->faker->dateTime,
];

ファイルの表示

@ -22,8 +22,8 @@ class MeetingApprovalsFactory extends Factory
public function definition()
{
return [
'child_id' => 1,
'meeting_id' => 1,
'child_id' => rand(1, 10),
'meeting_id' => rand(1, 10),
'approval_at' => $this->faker->dateTime,
'created_at' => $this->faker->dateTime,
'updated_at' => $this->faker->dateTime,

ファイルの表示

@ -22,7 +22,7 @@ class MeetingFactory extends Factory
public function definition()
{
return [
'father_id' => 1,
'father_id' => rand(1, 10),
'title' => $this->faker->name,
'text' => $this->faker->realText(49),
'pdf' => "https://crowdworks.jp/attachments/36836755.pdf",

ファイルの表示

@ -22,7 +22,7 @@ class MeetingImageFactory extends Factory
public function definition()
{
return [
'meeting_id' => 1,
'meeting_id' => rand(1, 10),
'image' => "/assets/img/avatar/avatar-sample02@2x.png",
'created_at' => $this->faker->dateTime,
'updated_at' => $this->faker->dateTime,

ファイルの表示

@ -29,7 +29,7 @@ class TelActivationFactory extends Factory
return [
'type' => rand(0, 1),
'child_id' => 1,
'child_id' => rand(1, 10),
'tel' => $tel[rand(0, 2)],
'token' => $this->faker->creditCardNumber,
'ttl' => $this->faker->dateTime,