feat(events): add event categories and filtering
This commit is contained in:
@@ -20,6 +20,7 @@ class TestEventsSeeder extends Seeder
|
||||
$events = [
|
||||
[
|
||||
'title' => '[Prueba] Noche de Música en Vivo',
|
||||
'category' => 'Música',
|
||||
'subtitle' => 'Una noche para cantar y bailar',
|
||||
'description' => 'Evento de prueba para explorar la cartelera de OnTicket.',
|
||||
'location' => 'Teatro Broadway, Rosario',
|
||||
@@ -30,6 +31,7 @@ class TestEventsSeeder extends Seeder
|
||||
],
|
||||
[
|
||||
'title' => '[Prueba] Festival de Sabores',
|
||||
'category' => 'Otros',
|
||||
'subtitle' => 'Gastronomía y música para toda la familia',
|
||||
'description' => 'Evento de prueba con dos jornadas disponibles.',
|
||||
'location' => 'Parque de España, Rosario',
|
||||
@@ -41,6 +43,7 @@ class TestEventsSeeder extends Seeder
|
||||
],
|
||||
[
|
||||
'title' => '[Prueba] Stand Up en el Centro',
|
||||
'category' => 'Teatro',
|
||||
'subtitle' => 'Humor para compartir',
|
||||
'description' => 'Evento de prueba para visualizar distintas propuestas.',
|
||||
'location' => 'Centro Cultural La Comedia, Rosario',
|
||||
@@ -60,9 +63,16 @@ class TestEventsSeeder extends Seeder
|
||||
'description' => $definition['description'],
|
||||
'location' => $definition['location'],
|
||||
'published_at' => now(),
|
||||
'event_category_id' => $tenant->eventCategories()
|
||||
->where('nombre', $definition['category'])->value('id'),
|
||||
],
|
||||
);
|
||||
|
||||
if ($event->event_category_id === null) {
|
||||
$event->update(['event_category_id' => $tenant->eventCategories()
|
||||
->where('nombre', $definition['category'])->value('id')]);
|
||||
}
|
||||
|
||||
if ($event->attachment_id === null) {
|
||||
$path = public_path('images/tennants/onticket/test-events/'.$definition['image']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user