ajout fixtures et styles

This commit is contained in:
Rudy
2023-01-09 08:22:34 +01:00
parent b21f2bc04b
commit 421b71ca11
28 changed files with 311 additions and 50 deletions

View File

@ -0,0 +1,22 @@
<?php
namespace App\DataFixtures;
use App\Entity\DonCat;
use Doctrine\Persistence\ObjectManager;
use Doctrine\Bundle\FixturesBundle\Fixture;
class DonCatFixtures extends Fixture
{
public function load(ObjectManager $manager): void
{
$donCat1 = (new DonCat())->setName('cat1');
$manager->persist($donCat1);
$donCat2 = (new DonCat())->setName('cat2');
$manager->persist($donCat2);
$donCat3 = (new DonCat())->setName('cat3');
$manager->persist($donCat3);
$manager->flush();
}
}