mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-01-24 12:03:17 +00:00
- **Added:** `MeetupEventFactory` for generating test data. - **Implemented:** Rate limiting (`throttle:calendar`) for `stream-calendar` routes to prevent abuse. - **Enhanced:** `DownloadMeetupCalendar` controller with validation and cleaner query structure. - **Added:** Feature tests for calendar downloading, invalid input handling, and rate limiting.
31 lines
765 B
PHP
31 lines
765 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\MeetupEvent>
|
|
*/
|
|
class MeetupEventFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'meetup_id' => \App\Models\Meetup::factory(),
|
|
'start' => now()->addWeek(),
|
|
'location' => fake()->address(),
|
|
'description' => fake()->paragraph(),
|
|
'link' => fake()->url(),
|
|
'attendees' => [],
|
|
'might_attendees' => [],
|
|
'created_by' => \App\Models\User::factory(),
|
|
];
|
|
}
|
|
}
|