mirror of
https://github.com/crater-invoice/crater.git
synced 2025-12-15 18:02:55 -05:00
init crater
This commit is contained in:
21
database/factories/PaymentFactory.php
Normal file
21
database/factories/PaymentFactory.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use Laraspace\Payment;
|
||||
use Laraspace\User;
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(Payment::class, function (Faker $faker) {
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(User::class)->create(['role' => 'customer'])->id;
|
||||
},
|
||||
'payment_date' => $faker->date($format = 'd/m/Y', $max = 'now'),
|
||||
'company_id' => User::find(1)->company_id,
|
||||
'notes' => $faker->text(80),
|
||||
'amount' => $faker->randomDigitNotNull,
|
||||
'payment_number' => 'PAY-'.Payment::getNextPaymentNumber(),
|
||||
'payment_mode' => 'OTHER'
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user