19 public function run(): void
24 foreach ($users as $user) {
28 ->create([
'user_id' => $user->id]);
34 ->create([
'user_id' => $user->id]);
40 ->create([
'user_id' => $user->id]);
46 ->create([
'user_id' => $user->id]);
50 $testUser = User::where(
'email',
'test@example.com')->first();
53 ShortUrl::factory()->create([
54 'user_id' => $testUser->id,
56 'original_url' =>
'https://www.google.com',
58 'last_used_at' => now()->subDays(2),
61 ShortUrl::factory()->create([
62 'user_id' => $testUser->id,
64 'original_url' =>
'https://www.github.com',
66 'last_used_at' =>
null,
69 ShortUrl::factory()->create([
70 'user_id' => $testUser->id,
72 'original_url' =>
'https://www.laravel.com',
74 'last_used_at' => now()->subMonths(3),