We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 881968d commit 2a58e8cCopy full SHA for 2a58e8c
database/factories/UserFactory.php
@@ -45,4 +45,18 @@ public function unverified()
45
];
46
});
47
}
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
+ }
62
0 commit comments