Skip to content

Commit

Permalink
fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
msalakhov committed Mar 24, 2022
1 parent 9c45e17 commit f63f7d4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
31 changes: 31 additions & 0 deletions app/migrations/Version20220324104150.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220324104150 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE client_insurance ADD created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\'');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE client_insurance DROP created_at');
}
}
4 changes: 2 additions & 2 deletions app/src/Controller/ClientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function create(UserInterface $user, Request $request): Response
$entityManager->persist($client);
$entityManager->flush();

return $this->redirectToRoute('client');
return $this->redirectToRoute('homepage');
}

return $this->render('client/create.html.twig', [
Expand Down Expand Up @@ -156,7 +156,7 @@ public function edit(Request $request, $id, UserInterface $user): Response
$entityManager = $this->getDoctrine()->getManager();
$entityManager->flush();

return $this->redirectToRoute('client');
return $this->redirectToRoute('homepage');
}

return $this->render('client/edit.html.twig', [
Expand Down
2 changes: 1 addition & 1 deletion app/src/Entity/ClientInsurance.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* @ORM\Entity(repositoryClass=ClientInsuranceRepository::class)
* @ORM\HasLyfecycleCallbaks()
* @ORM\HasLifecycleCallbacks()
*/
class ClientInsurance
{
Expand Down

0 comments on commit f63f7d4

Please sign in to comment.