Created
September 11, 2017 09:59
-
-
Save eghojansu/7d1ec28c5c1c63c816925a17cde98536 to your computer and use it in GitHub Desktop.
Snippet for post Install nelmio/alice di Framework Symfony
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# src/AppBundle/DataFixtures/ORM/fixtures/admin.yml | |
AppBundle\Entity\Admin: | |
admin{1..2}: | |
name: '<firstName()> <lastName()>' | |
gender: '<myGender()>' | |
birthplace: '<city()>' | |
birthdate: '<dateTime()>' | |
user: '@userAdmin<current()>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# src/AppBundle/DataFixtures/ORM/fixtures/operator.yml | |
AppBundle\Entity\Operator: | |
operator{1..2}: | |
nama: '<firstName()> <lastName()>' | |
jenisKelamin: '<myGender()>' | |
tempatLahir: '<city()>' | |
tanggalLahir: '<dateTime()>' | |
nomorHp: '<phoneNumber()>' | |
user: '@userOperator<current()>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# src/AppBundle/DataFixtures/ORM/fixtures/user.yml | |
parameters: | |
myPassword: 'welcome' | |
AppBundle\Entity\User: | |
userAdmin{1..2}: | |
username: 'admin<current()>' | |
password: '<myPassword(@self, "<{myPassword}>")>' | |
active: 1, | |
roles: | |
- 'ROLE_ADMIN' | |
userOperator{1..2}: | |
username: 'operator<current()>' | |
password: '<myPassword(@self, "<{myPassword}>")>' | |
active: 1, | |
roles: | |
- 'ROLE_OPERATOR' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment