PHP code example of stargazer-team / yii-doctrine-fixture

1. Go to this page and download the library: Download stargazer-team/yii-doctrine-fixture library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

stargazer-team / yii-doctrine-fixture example snippets




declare(strict_types=1);

use Yiisoft\Yii\DoctrineFixture\Enum\ConfigOptions;

'yiisoft/yii-doctrine-fixture' => [
        ConfigOptions::ENTITY_MANAGERS => [
            'default' => [
                ConfigOptions::DIRS => [
                    '@src/Fixture',
                ],
                ConfigOptions::FILES => [
                    '@src/Fixture/UserFixture.php',
                ],
                ConfigOptions::CLASSES => [
                    UserFixture::class,
                ],
            ],
        ],
    ]
bash
php yii doctrine:fixture:load --em=default