Skip to content

Instantly share code, notes, and snippets.

@programarivm
Last active May 11, 2023 15:02
Show Gist options
  • Save programarivm/1c05400a6bafe70ffb97eb0f2e944b3c to your computer and use it in GitHub Desktop.
Save programarivm/1c05400a6bafe70ffb97eb0f2e944b3c to your computer and use it in GitHub Desktop.
<?php
namespace App\DataFixtures;
use App\Entity\User;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
class UserFixtures extends Fixture
{
public function load(ObjectManager $manager)
{
$user = new User();
$user->setUsername('bob');
$manager->persist($user);
$manager->flush();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment