forked from lubiana/futtern
!20 add createdby field to order form
This commit is contained in:
parent
511f12f10f
commit
70041d7357
4 changed files with 7 additions and 0 deletions
|
@ -26,6 +26,8 @@ final class FoodOrderController extends AbstractController
|
|||
public function new(Request $request, EntityManagerInterface $entityManager): Response
|
||||
{
|
||||
$foodOrder = new FoodOrder;
|
||||
$username = $request->cookies->get('username', 'nobody');
|
||||
$foodOrder->setCreatedBy($username);
|
||||
$form = $this->createForm(FoodOrderType::class, $foodOrder, [
|
||||
'action' => $this->generateUrl('app_food_order_new'),
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue