summaryrefslogtreecommitdiff
path: root/src/Controller/Unit.php
diff options
context:
space:
mode:
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(