Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /var/www/symfony # ./bin/console make:entity
- Class name of the entity to create or update (e.g. DeliciousPizza):
- > User
- created: src/Entity/User.php
- created: src/Repository/UserRepository.php
- Entity generated! Now let's add some fields!
- You can always add more fields later manually or by re-running this command.
- New property name (press <return> to stop adding fields):
- > username
- Field type (enter ? to see all types) [string]:
- >
- Field length [255]:
- >
- Can this field be null in the database (nullable) (yes/no) [no]:
- >
- updated: src/Entity/User.php
- Add another property? Enter the property name (or press <return> to stop adding fields):
- > email
- Field type (enter ? to see all types) [string]:
- >
- Field length [255]:
- >
- Can this field be null in the database (nullable) (yes/no) [no]:
- >
- updated: src/Entity/User.php
- Add another property? Enter the property name (or press <return> to stop adding fields):
- > password
- Field type (enter ? to see all types) [string]:
- >
- Field length [255]:
- >
- Can this field be null in the database (nullable) (yes/no) [no]:
- > yes
- updated: src/Entity/User.php
- Add another property? Enter the property name (or press <return> to stop adding fields):
- > address
- Field type (enter ? to see all types) [string]:
- > text
- Can this field be null in the database (nullable) (yes/no) [no]:
- > yes
- updated: src/Entity/User.php
- Add another property? Enter the property name (or press <return> to stop adding fields):
- >
- Success!
- Next: When you're ready, create a migration with make:migration
- /var/www/symfony #
Advertisement
Add Comment
Please, Sign In to add comment