summaryrefslogtreecommitdiff
path: root/src/Controller/Unit.php
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-12-02 14:14:34 +0100
committerDaniel Weipert <code@drogueronin.de>2023-12-02 14:14:34 +0100
commite5a243a52b910e35b10b26c06aa8978356b86769 (patch)
tree74ddb82add2f3ea200e9fd11cfedb6c0cace09be /src/Controller/Unit.php
parentfa9096c0ab521aae45cab6c48a54290d14a221b9 (diff)
login and events
Diffstat (limited to 'src/Controller/Unit.php')
-rw-r--r--src/Controller/Unit.php5
1 files changed, 5 insertions, 0 deletions
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(