*/ protected $model = ExportJob::class; /** * Define the model's default state. * * @return array */ public function definition() { return [ 'account_id' => factory(Account::class)->create(), 'user_id' => function (array $attributes) { return factory(User::class)->create([ 'account_id' => $attributes['account_id'], ]); }, 'type' => 'json', ]; } }