You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
733 B

  1. <?php
  2. /** @var \Illuminate\Database\Eloquent\Factory $factory */
  3. use App\Work;
  4. use Carbon\Carbon;
  5. use Faker\Generator as Faker;
  6. $factory->define(Work::class, function (Faker $faker) {
  7. $started_at = $faker->dateTime('now');
  8. $ended_at = $faker->dateTime('now');
  9. // $minute_sum = $ended_at->diffInMinutes($started_at);
  10. return [
  11. 'business_id' => $faker->numberBetween(1, 200),
  12. 'project_id' => $faker->numberBetween(1, 200),
  13. 'task_id' => $faker->numberBetween(1, 200),
  14. 'user_id' => $faker->numberBetween(1, 5000),
  15. 'message' => $faker->name,
  16. 'minute_sum' => $faker->numberBetween(100, 5000),
  17. 'started_at' => $started_at,
  18. 'ended_at' => $ended_at,
  19. ];
  20. });