|
|
|
@ -1,6 +1,7 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use Carbon\Carbon; |
|
|
|
use Illuminate\Support\Str; |
|
|
|
use Faker\Generator as Faker; |
|
|
|
use App\Entities\Partners\Vendor; |
|
|
|
use App\Entities\Projects\Project; |
|
|
|
@ -11,19 +12,19 @@ $factory->define(Subscription::class, function (Faker $faker) { |
|
|
|
$startDate = Carbon::parse($faker->dateTimeBetween('-1 year', '-1 month')->format('Y-m-d')); |
|
|
|
|
|
|
|
return [ |
|
|
|
'project_id' => function () { |
|
|
|
'project_id' => function () { |
|
|
|
return factory(Project::class)->create()->id; |
|
|
|
}, |
|
|
|
'type_id' => 1, |
|
|
|
'status_id' => 1, |
|
|
|
'name' => 'www.'.str_random(10).'.com', |
|
|
|
'name' => 'www.'.Str::random(10).'.com', |
|
|
|
'price' => 125000, |
|
|
|
'start_date' => $startDate->format('Y-m-d'), |
|
|
|
'due_date' => $startDate->addYears(1)->format('Y-m-d'), |
|
|
|
'customer_id' => function () { |
|
|
|
return factory(Customer::class)->create()->id; |
|
|
|
}, |
|
|
|
'vendor_id' => function () { |
|
|
|
'vendor_id' => function () { |
|
|
|
return factory(Vendor::class)->create()->id; |
|
|
|
}, |
|
|
|
]; |
|
|
|
|