init crater

This commit is contained in:
Mohit Panjwani
2019-11-11 12:16:00 +05:30
commit bdf2ba51d6
668 changed files with 158503 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use Laraspace\Expense;
use Laraspace\ExpenseCategory;
use Faker\Generator as Faker;
use Laraspace\User;
$factory->define(Expense::class, function (Faker $faker) {
return [
'expense_date' => $faker->date($format = 'd/m/Y', $max = 'now'),
'expense_category_id' => function () {
return factory(ExpenseCategory::class)->create()->id;
},
'company_id' => User::find(1)->company_id,
'amount' => $faker->randomDigitNotNull,
'notes' => $faker->text,
'attachment_receipt' => null
];
});