Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
4c45b429
Commit
4c45b429
authored
Jan 02, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc fix.
parent
f3315475
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
FixtureController.php
extensions/yii/faker/FixtureController.php
+4
-4
README.md
extensions/yii/faker/README.md
+2
-3
FixtureController.php
framework/yii/console/controllers/FixtureController.php
+2
-2
No files found.
extensions/yii/faker/FixtureController.php
View file @
4c45b429
...
...
@@ -69,7 +69,7 @@ use yii\helpers\Console;
* ~~~
*
* In the code above "users" is template name, after this command run, new file named same as template
* will be created under the
$fixturesPath
folder.
* will be created under the
`$fixturePath`
folder.
* You can generate fixtures for all templates by specifying keyword "all"
*
* ~~~
...
...
@@ -90,13 +90,13 @@ use yii\helpers\Console;
*
* ~~~
* //generate fixtures in russian language
* yii fixture/generate users 5 --language=
'ru_RU'
* yii fixture/generate users 5 --language=
ru_RU
*
* //read templates from the other path
* yii fixture/generate all --templatePath=
'@app/path/to/my/custom/templates'
* yii fixture/generate all --templatePath=
@app/path/to/my/custom/templates
*
* //generate fixtures into other folders, but be sure that this folders exists or you will get notice about that.
* yii fixture/generate all --fixturePath=
'@tests/unit/fixtures/subfolder1/subfolder2/subfolder3'
* yii fixture/generate all --fixturePath=
@tests/unit/fixtures/subfolder1/subfolder2/subfolder3
* ~~~
*
* You also can create your own data providers for custom tables fields, see Faker library guide for more info (https://github.com/fzaninotto/Faker);
...
...
extensions/yii/faker/README.md
View file @
4c45b429
...
...
@@ -123,7 +123,7 @@ php yii fixture/generate users 5 --language='ru_RU'
php
yii
fixture
/
generate
all
--
templatePath
=
'@app/path/to/my/custom/templates'
//generate fixtures into other folders, but be sure that this folders exists or you will get notice about that.
php
yii
fixture
/
generate
all
--
fixture
s
Path
=
'@tests/unit/fixtures/subfolder1/subfolder2/subfolder3'
php
yii
fixture
/
generate
all
--
fixturePath
=
'@tests/unit/fixtures/subfolder1/subfolder2/subfolder3'
```
You also can create your own data providers for custom tables fields, see
[
Faker
](
(https://github.com/fzaninotto/Faker
)
) library guide for more info;
...
...
@@ -157,4 +157,4 @@ You can use it by adding it to the ```$providers``` property of the current comm
],
],
]
```
\ No newline at end of file
```
framework/yii/console/controllers/FixtureController.php
View file @
4c45b429
...
...
@@ -39,10 +39,10 @@ use yii\console\Exception;
* yii fixture users
*
* #load fixtures under $fixturePath to the "users" table to the different connection
* yii fixture/apply users --db=
'someOtherDbConneciton'
* yii fixture/apply users --db=
someOtherDbConneciton
*
* #load fixtures under different $fixturePath to the "users" table.
* yii fixture/apply users --fixturePath=
'@app/some/other/path/to/fixtures'
* yii fixture/apply users --fixturePath=
@app/some/other/path/to/fixtures
* ~~~
*
* @author Mark Jebri <mark.github@yandex.ru>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment