Skip to content

Commit 2a58e8c

Browse files
committed
🗃️ modification des factory de user
1 parent 881968d commit 2a58e8c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

database/factories/UserFactory.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,18 @@ public function unverified()
4545
];
4646
});
4747
}
48+
49+
/**
50+
* Indicate that the model's created_at should be last month.
51+
*
52+
* @return \Illuminate\Database\Eloquent\Factories\Factory
53+
*/
54+
public function lastMonth()
55+
{
56+
return $this->state(function (array $attributes) {
57+
return [
58+
'created_at' => now()->subMonth(),
59+
];
60+
});
61+
}
4862
}

0 commit comments

Comments
 (0)