/**
  * Gets a random date from this year
  *
  * @param Faker\Generator
  * @return string
  */
 public function getFakeData(Generator $faker)
 {
     return $faker->dateTimeThisYear()->format('Y-m-d');
 }
예제 #2
0
 public function newRandomActivity($person)
 {
     $activity = (new Activity())->setUser($this->getRandomUser())->setPerson($person)->setDate($this->faker->dateTimeThisYear())->setDurationTime($this->faker->dateTime(36000))->setType($this->getRandomActivityType())->setReason($this->getRandomActivityReason())->setScope($this->getRandomScope())->setAttendee($this->faker->boolean())->setRemark('A remark');
     return $activity;
 }