Skip to content

Commit

Permalink
added factory for wishlist
Browse files Browse the repository at this point in the history
  • Loading branch information
indpurvesh committed Jan 13, 2019
1 parent db4b97a commit 7babf13
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions database/factories/WishlistFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

use Faker\Generator as Faker;
use AvoRed\Framework\Models\Database\User;
use AvoRed\Framework\Models\Database\Country;
use AvoRed\Framework\Models\Database\Product;

$factory->define(AvoRed\Framework\Models\Database\Wishlist::class, function (Faker $faker) {
$user = factory(User::class)->create();
$product = factory(Product::class)->create();

return [
'user_id' => $user->id,
'product_id' => $product->id
];
});

0 comments on commit 7babf13

Please sign in to comment.