|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
|
|
use App\Models\Customer;
|
|
|
|
|
use App\Models\Invoice;
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
|
use Illuminate\Support\Carbon;
|
|
|
|
@ -12,11 +13,15 @@ class InvoiceFactory extends Factory
|
|
|
|
|
|
|
|
|
|
public function definition(): array
|
|
|
|
|
{
|
|
|
|
|
$customer = Customer::all()->shuffle()->first();
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
'created_at' => Carbon::now(),
|
|
|
|
|
'gst' => true,
|
|
|
|
|
'pst' => $this->faker->boolean(25),
|
|
|
|
|
'updated_at' => Carbon::now(),
|
|
|
|
|
'created_at' => Carbon::now(),
|
|
|
|
|
'gst' => true,
|
|
|
|
|
'pst' => $this->faker->boolean(25),
|
|
|
|
|
'paid' => $this->faker->boolean(),
|
|
|
|
|
'customer_id' => $customer->id,
|
|
|
|
|
'updated_at' => Carbon::now(),
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|