Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function createTeam(Request $request)
- {
- $teamForm = $this->createForm(TeamType::class);
- $teamForm->handleRequest($request);
- if ($teamForm->isSubmitted() && $teamForm->isValid()) {
- $user = $this->getUser();
- $team = $teamForm->getData();
- $team->setCreatedAt(new DateTime())
- ->setCreator($user);
- $this->em->persist($team);
- //dd($team);
- $this->em->flush();
- }
- TeamController.php on line 52:
- Team {#591 ▼
- -id: null
- -creator: SteamUser {#238 ▼
- -id: 1
- -roles: array:1 [▶]
- -nickName: "steamuser"
- -userName: "76561192288153971"
- -password: "LrC8fFLuIdPqAiDHDATiheRaIBk="
- -avatar: "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/9e/9e8567cc32383f28df41da7fbca7e8afd47f8516.jpg"
- -teams: PersistentCollection {#290 ▶}
- }
- -name: "dasdasdasdas"
- -logo: null
- -teamType: 2
- -createdAt: DateTime {#594 ▶}
- -roster: ArrayCollection {#571 ▶}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement