Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ╭─yoesoff@yoesoff-ThinkPad-X220 ~/Documents/Oproject/Oapi
- ╰─➤ php bin/console make:entity
- Class name of the entity to create or update (e.g. GrumpyChef):
- > User
- Mark this class as an API Platform resource (expose a CRUD API for it) (yes/no) [no]:
- > yes
- 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]:
- > 100
- 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]:
- > 100
- Can this field be null in the database (nullable) (yes/no) [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):
- > isActive
- Field type (enter ? to see all types) [boolean]:
- >
- 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):
- >
- Success!
- Next: When you're ready, create a migration with make:migration
Advertisement
Add Comment
Please, Sign In to add comment