improve sync daily changes command

This commit is contained in:
hackerESQ
2024-09-15 11:28:13 -05:00
parent 9708716c71
commit 9696339828
5 changed files with 73 additions and 16 deletions
+14
View File
@@ -43,6 +43,13 @@ class TransactionFactory extends Factory
]);
}
public function lastYear(): static
{
return $this->state(fn (array $attributes) => [
'date' => now()->subYear()->format('Y-m-d'),
]);
}
public function lastMonth(): static
{
return $this->state(fn (array $attributes) => [
@@ -50,6 +57,13 @@ class TransactionFactory extends Factory
]);
}
public function recent(): static
{
return $this->state(fn (array $attributes) => [
'date' => $this->faker->dateTimeBetween('-2 weeks', 'now')->format('Y-m-d'),
]);
}
public function symbol($symbol): static
{
return $this->state(fn (array $attributes) => [