Skip to content

Instantly share code, notes, and snippets.

@programarivm
Last active May 11, 2023 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programarivm/ded922793098403a783d7885b369ec92 to your computer and use it in GitHub Desktop.
Save programarivm/ded922793098403a783d7885b369ec92 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')
->setEmail('bob@gmail.com');
$manager->persist($user);
$manager->flush();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment