yoesoff

symfony make:entity

Sep 28th, 2019
590
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.67 KB | None | 0 0
  1. /var/www/symfony # ./bin/console make:entity
  2.  
  3.  Class name of the entity to create or update (e.g. DeliciousPizza):
  4.  > User
  5.  
  6.  created: src/Entity/User.php
  7.  created: src/Repository/UserRepository.php
  8.  
  9.  Entity generated! Now let's add some fields!
  10. You can always add more fields later manually or by re-running this command.
  11.  
  12. New property name (press <return> to stop adding fields):
  13. > username
  14.  
  15. Field type (enter ? to see all types) [string]:
  16. >
  17.  
  18. Field length [255]:
  19. >
  20.  
  21. Can this field be null in the database (nullable) (yes/no) [no]:
  22. >
  23.  
  24. updated: src/Entity/User.php
  25.  
  26. Add another property? Enter the property name (or press <return> to stop adding fields):
  27. > email
  28.  
  29. Field type (enter ? to see all types) [string]:
  30. >
  31.  
  32. Field length [255]:
  33. >
  34.  
  35. Can this field be null in the database (nullable) (yes/no) [no]:
  36. >
  37.  
  38. updated: src/Entity/User.php
  39.  
  40. Add another property? Enter the property name (or press <return> to stop adding fields):
  41. > password
  42.  
  43. Field type (enter ? to see all types) [string]:
  44. >
  45.  
  46. Field length [255]:
  47. >
  48.  
  49. Can this field be null in the database (nullable) (yes/no) [no]:
  50. > yes
  51.  
  52. updated: src/Entity/User.php
  53.  
  54. Add another property? Enter the property name (or press <return> to stop adding fields):
  55. > address
  56.  
  57. Field type (enter ? to see all types) [string]:
  58. > text
  59.  
  60. Can this field be null in the database (nullable) (yes/no) [no]:
  61. > yes
  62.  
  63. updated: src/Entity/User.php
  64.  
  65. Add another property? Enter the property name (or press <return> to stop adding fields):
  66. >
  67.  
  68.  
  69.          
  70.  Success!
  71.          
  72.  
  73. Next: When you're ready, create a migration with make:migration
  74.  
  75. /var/www/symfony #
Advertisement
Add Comment
Please, Sign In to add comment