From e5a243a52b910e35b10b26c06aa8978356b86769 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 2 Dec 2023 14:14:34 +0100 Subject: login and events --- src/Controller/Unit.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Controller/Unit.php') diff --git a/src/Controller/Unit.php b/src/Controller/Unit.php index 1774c17..0508249 100644 --- a/src/Controller/Unit.php +++ b/src/Controller/Unit.php @@ -208,6 +208,11 @@ class Unit ); } + DB::query( + 'insert into village_units (amount, type, home_village_id, residence_village_id, is_traveling) values (:amount, :type, :home, :home, true)', + ['amount' => $amount, 'type' => $request->get('unit'), 'home' => $village->id] + ); + // event $event = new Event(); $event->time = (new \DateTime())->add( -- cgit v1.2.3