orm
orm copied to clipboard
Factory for testing missing afterCreatingState method.
Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].
Package version, Laravel version
"laravel-doctrine/orm": "1.4.7",
"laravel/lumen-framework": "5.6.*",
Expected behaviour
Want to be able to create factories that are able to create associations that depend on prior models. E.g.
$factory ->state(App\User::class, 'with_posts', []) ->afterCreatingState(App\User::class, 'with_posts', function ($user, $faker, $config) { factory(App\Post::class, $config->get('posts_count', 5))->create([ 'user_id' => $user->id, ]); });
Actual behaviour
afterCreatingState method is missing.
Steps to reproduce the behaviour
Try calling ->afterCreatingState
There's a merge request that will resolve this. #363